Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: cli files on Windows (#1159)
Browse files Browse the repository at this point in the history
* fix:  files add -w

* fix:  files get
  • Loading branch information
richardschneider authored and daviddias committed Dec 20, 2017
1 parent 9e61377 commit 1b98fa1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cli/commands/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function addPipeline (index, addStream, list, argv) {
originalPath: file.path
})),
pull.map((file) => ({
path: wrapWithDirectory ? path.join(WRAPPER, file.path) : file.path,
path: wrapWithDirectory ? WRAPPER + file.path : file.path,
content: fs.createReadStream(file.originalPath)
})),
addStream,
Expand Down
8 changes: 2 additions & 6 deletions src/cli/commands/files/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@ const print = require('../../utils').print

function checkArgs (hash, outPath) {
// format the output directory
if (!outPath.endsWith('/')) {
outPath += '/'
}

if (!outPath.startsWith('/')) {
outPath = path.join('/', outPath)
if (!outPath.endsWith(path.sep)) {
outPath += path.sep
}

return outPath
Expand Down

0 comments on commit 1b98fa1

Please sign in to comment.