Skip to content

Commit

Permalink
fixup! Fix #26: Add support for running the action multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Dec 5, 2023
1 parent c96b2df commit 7d1e0c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/action/action.ts
Expand Up @@ -18,6 +18,7 @@ import * as input from './input'
import * as shell from './shell'
import * as utility from '../utility'
import {SyncDirection} from './sync_direction'
import {execSync} from 'child_process'

export enum SshConfigurationKind {
qemu,
Expand Down Expand Up @@ -569,6 +570,6 @@ class QemuSshConfiguration extends SshConfigurator {
private setupHostname(ipAddress: string): void {
if (ipAddress === 'localhost') ipAddress = '127.0.0.1'

fs.appendFileSync('/etc/hosts', `${ipAddress} ${this.cpaHost}\n`)
execSync(`sudo printf '${ipAddress} ${this.cpaHost}\n' >> /etc/hosts`)
}
}

0 comments on commit 7d1e0c1

Please sign in to comment.