Skip to content

Commit

Permalink
Fix editorconfig file path getter
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkerjoeri committed Nov 29, 2018
1 parent 0ae92e1 commit bc5ad2a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ async function promptCreateOptions() {
name: 'editorConfigPath',
message: '.editorconfig file path?',
validate: (answer) => {
if (!fs.existsSync(fullPath)) {
if (!fs.existsSync(answer)) {
return 'This path doesn\'t exist.'
}

if (!fs.stat(fullPath).isFile()) {
if (!fs.statSync(answer).isFile()) {
return 'The path you provided is not a file.'
}

Expand Down Expand Up @@ -263,7 +263,7 @@ function createDirectory(fullPath) {
}

async function getLocalEditorConfigContents(filepath) {
await execa.shell(`cat ${url}`)
return await execa.shell(`cat ${filepath}`)
.then((response) => {
return response.stdout;
})
Expand All @@ -273,7 +273,7 @@ async function getLocalEditorConfigContents(filepath) {
}

async function getHostedEditorConfigContents(url) {
await execa.shell(`curl ${filepath}`)
return await execa.shell(`curl ${url}`)
.then((response) => {
return response.stdout;
})
Expand Down

0 comments on commit bc5ad2a

Please sign in to comment.