diff --git a/src/cli/commands/files/get.js b/src/cli/commands/files/get.js index 69b11fc01f..31e8d17ad8 100644 --- a/src/cli/commands/files/get.js +++ b/src/cli/commands/files/get.js @@ -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) {