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

Commit

Permalink
fix(files:get): simplify checkArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 9, 2016
1 parent 46d9e6a commit 7f89bfb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/cli/commands/files/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ function checkArgs (hash, outPath) {
}
// format the output directory
if (!outPath) {
var cwd = process.cwd()
return cwd
} else {
if (!outPath.endsWith('/')) {
outPath += '/'
}
if (!outPath.startsWith('/')) {
outPath = path.join('/', outPath)
}
var directory = outPath
return directory
return process.cwd()
}

if (!outPath.endsWith('/')) {
outPath += '/'
}

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

return outPath
}

function ensureDir (dir, cb) {
Expand Down

0 comments on commit 7f89bfb

Please sign in to comment.