Skip to content

Commit

Permalink
fix: store sanitized project name
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko committed Sep 27, 2019
1 parent 9336aff commit 8003e32
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from "chalk";
import { askForFeatures, askForProjectDetails, askIfOverrideProjectFile } from "../core/prompt";
import { Config, isProjectFileExists, saveWorkspace, getCurrentDirectoryBase } from "../core/utils";
import { Config, isProjectFileExists, saveWorkspace, getCurrentDirectoryBase, sanitize } from "../core/utils";
const debug = require("debug")("init");

module.exports = async function() {
Expand All @@ -16,14 +16,14 @@ module.exports = async function() {
}
}

let name = getCurrentDirectoryBase();
let name = sanitize(getCurrentDirectoryBase());
if (isForceModeEnabled === false) {
({ name } = await askForProjectDetails(name));
}
debug(`saving project name ${name}`);

saveWorkspace({
project: name
project: sanitize(name)
});

Config.set("project", name);
Expand Down

0 comments on commit 8003e32

Please sign in to comment.