Skip to content

Commit

Permalink
Revert "Run SSH in verbose mode when debug mode is enabled"
Browse files Browse the repository at this point in the history
This reverts commit bacc347.
  • Loading branch information
jacob-carlborg committed Dec 14, 2023
1 parent 0f566c3 commit 7f2fab9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 21 deletions.
3 changes: 0 additions & 3 deletions changelog.md
Expand Up @@ -14,9 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
has run. This adds a new input parameter: `shutdown_vm`. When set to `false`,
this will hopefully mitigate very frequent freezing of VM during teardown ([#61](https://github.com/cross-platform-actions/action/issues/61), [#72](https://github.com/cross-platform-actions/action/issues/72)).

### Changed
- Run any SSH commands to the VM in verbose mode when debug mode is enabled

## [0.21.1] - 2023-11-03
### Fixed
- FreeBSD jobs occasionally fail when ejecting the disk ([#64](https://github.com/cross-platform-actions/action/issues/64))
Expand Down
10 changes: 2 additions & 8 deletions 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.

15 changes: 6 additions & 9 deletions src/vm.ts
Expand Up @@ -164,27 +164,24 @@ export abstract class Vm {
if (options.log) core.info(`Executing command inside VM: ${command}`)
const buffer = Buffer.from(command)

return await exec.exec('ssh', this.executeBaseArgs, {
return await exec.exec('ssh', ['-t', `${Vm.user}@${Vm.cpaHost}`], {
input: buffer,
silent: options.silent,
ignoreReturnCode: options.ignoreReturnCode
})
}

async execute2(args: string[], intput: Buffer): Promise<number> {
return await exec.exec('ssh', this.executeBaseArgs.concat(args), {
input: intput
})
return await exec.exec(
'ssh',
['-t', `${Vm.user}@${Vm.cpaHost}`].concat(args),
{input: intput}
)
}

protected async getIpAddress(): Promise<string> {
throw Error('Not implemented')
}

protected abstract get command(): string[]

private get executeBaseArgs(): string[] {
const baseArgs = ['-t', `${Vm.user}@${Vm.cpaHost}`]
return core.isDebug() ? baseArgs.concat(['-vvv']) : baseArgs
}
}

0 comments on commit 7f2fab9

Please sign in to comment.