Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Adding support of asUser #260

Merged
merged 5 commits into from
Mar 18, 2020
Merged

Adding support of asUser #260

merged 5 commits into from
Mar 18, 2020

Conversation

oleg-andreyev
Copy link
Contributor

Added support of asUser to shipit.
asUser is already supported by ssh-pool because it was not exposed.

Also wrapped asUser command with bash -c to ensure that if [ ... ]; then ..; fi; is supported.

@gregberge
Copy link
Member

Hello @oleg-andreyev, could you please fix tests?

@gregberge
Copy link
Member

The commit history is fucked up. Could you make a linear history in the PR please?

oleg-andreyev and others added 5 commits March 15, 2020 20:21
…d "should log output" because of deprecations, updated "should copy to remote" to make sure it does not conflict with other builds, added force_color=0 to ensure that "color" is not appended, fixing babelNode resolve
@@ -1,3 +1,5 @@
process.env.FORCE_COLOR=0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

without these changes tests aren't passing on local machine

@@ -3,22 +3,23 @@ import { exec } from 'ssh-pool'

const shipitCli = path.resolve(__dirname, '../src/cli.js')
const shipitFile = path.resolve(__dirname, './sandbox/shipitfile.babel.js')
const babelNode = require.resolve('@babel/node/bin/babel-node');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of hardcoded, resolving from current node context

@@ -481,8 +481,8 @@ describe('Connection', () => {
'/src/dir',
'user@host:/dest/dir',
)
expect(output.stdout[0].toString()).toBe('@host first line\n')
expect(output.stderr[0].toString()).toBe('@host-err an error\n')
expect(output.stdout.toString()).toContain('@host first line\n')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deprecations are affecting this assert

@oleg-andreyev
Copy link
Contributor Author

@gregberge fixed.

@gregberge gregberge merged commit 4e79edb into shipitjs:master Mar 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants