Skip to content

Commit

Permalink
Fix #14: create existing directory gracefully
Browse files Browse the repository at this point in the history
  • Loading branch information
amasin76 committed Mar 12, 2024
1 parent 2502ebe commit 1668105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/content/scrapeFilesNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function generateCommandLine(dirName: string | undefined, fileNames: string[]):
const subDirs = new Set<string>();

if (dirName === undefined) return (commandLine = "No files or dirs got found.");
commandLine = `mkdir "${dirName}" && cd "${dirName}" && touch README.md `;
commandLine = `mkdir -p "${dirName}" && cd "${dirName}" && touch README.md `;

fileNames.forEach((fileName) => {
const parts = fileName.split("/");
Expand Down

0 comments on commit 1668105

Please sign in to comment.