Skip to content

Commit

Permalink
fix(android): no longer errors out if write dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
peggyrayzis committed Jun 28, 2017
1 parent ec167be commit b8181c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
build/
.vscode/
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ async function createJavaEnvironment(templateName) {
);
const paths = {
readDirPath: path.join(__dirname, "..", "templates", "android-java"),
writeDirPath
writeDirPath: writeDirPath
? writeDirPath
: path.join(appPath, templateName.toLowerCase())
};
const files = [
"TemplatePackage.java",
Expand Down Expand Up @@ -121,7 +123,9 @@ async function createKotlinEnvironment(templateName) {
);
const paths = {
readDirPath: path.join(__dirname, "..", "templates", "android-kotlin"),
writeDirPath
writeDirPath: writeDirPath
? writeDirPath
: path.join(appPath, templateName.toLowerCase())
};
const files = [
"TemplatePackage.kt",
Expand Down

0 comments on commit b8181c8

Please sign in to comment.