Skip to content

Commit

Permalink
fix(core): remove ref to ssh in fs.move
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Feb 26, 2021
1 parent 33be522 commit a1644c9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
9 changes: 1 addition & 8 deletions packages/core/lib/actions/fs/move.js

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

5 changes: 1 addition & 4 deletions packages/core/src/actions/fs/move.coffee.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@ console.info(`Directory was moved: ${status}`)
## Handler

handler = ({config, metadata, tools: {log, path}, ssh}) ->
# SSH connection
ssh = await @ssh config.ssh
log message: "Stat target", level: 'DEBUG'
handler = ({config, metadata, tools: {log, path}}) ->
{exists} = await @fs.base.exists config.target
if not exists
log message: "Rename #{config.source} to #{config.target}", level: 'WARN'
Expand Down
5 changes: 3 additions & 2 deletions packages/core/test/actions/fs/move.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ describe 'actions.fs.move', ->
@fs.base.writeFile
target: "#{tmpdir}/org_file"
content: ''
@fs.move
{status} = await @fs.move
target: "#{tmpdir}/new_name"
source: "#{tmpdir}/org_file"
.should.be.finally.containEql status: true
# .should.be.finally.containEql status: true
status.should.be.true()
# The target file should exists
@fs.assert
target: "#{tmpdir}/new_name"
Expand Down

0 comments on commit a1644c9

Please sign in to comment.