Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! Fix #26: Add support for running the action multiple times
Browse files Browse the repository at this point in the history
jacob-carlborg committed Dec 5, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c96b2df commit 7d1e0c1
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
Original file line number Diff line number Diff line change
@@ -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,
@@ -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.