Skip to content
Snippets Groups Projects
Unverified Commit 0742d3bc authored by Marcus Schiesser's avatar Marcus Schiesser Committed by GitHub
Browse files

fix: don't create devcontainer if it exists (#35)

parent 625ed4d6
No related branches found
No related tags found
No related merge requests found
......@@ -46,13 +46,16 @@ export const writeDevcontainer = async (
framework: TemplateFramework,
frontend: boolean,
) => {
console.log("Adding .devcontainer");
const devcontainerDir = path.join(root, ".devcontainer");
if (fs.existsSync(devcontainerDir)) {
console.log("Template already has a .devcontainer. Using it.");
return;
}
const devcontainerContent = renderDevcontainerContent(
templatesDir,
framework,
frontend,
);
const devcontainerDir = path.join(root, ".devcontainer");
fs.mkdirSync(devcontainerDir);
await fs.promises.writeFile(
path.join(devcontainerDir, "devcontainer.json"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment