Skip to content

Commit

Permalink
made the required changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushNautiyalDeveloper committed Sep 30, 2023
1 parent 013599d commit 0bb6b5d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/commands/new/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,10 @@ export default class NewFile extends Command {
}
} catch (e:any) {
if (e.code === 'EACCES') {
console.error('Permission denied to read the file. You do not have the necessary permissions.');
} else {
await writeFile(fileNameToWriteToDisk, asyncApiFile, { encoding: 'utf8' });
console.log(`Created file ${fileNameToWriteToDisk}...`);
this.error('Permission denied to read the file. You do not have the necessary permissions.');
}
}
await writeFile(fileNameToWriteToDisk, asyncApiFile, { encoding: 'utf8' });
console.log(`Created file ${fileNameToWriteToDisk}...`);
}
}

0 comments on commit 0bb6b5d

Please sign in to comment.