Skip to content

Commit

Permalink
[now-cli] Do not prompt for root directory when project is linked (#3737
Browse files Browse the repository at this point in the history
)

* do not prompt for root directory when linked

* run tests

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Leo Lamprecht <mindrun@icloud.com>
  • Loading branch information
3 people committed Feb 5, 2020
1 parent 8f66e4a commit 8cbf036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/now-cli/src/commands/deploy/latest.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,10 @@ export default async function main(

if (typeof projectOrNewProjectName === 'string') {
newProjectName = projectOrNewProjectName;
rootDirectory = await inputRootDirectory(path, output, autoConfirm);
} else {
project = projectOrNewProjectName;
rootDirectory = project.rootDirectory;

// we can already link the project
await linkFolderToProject(
Expand All @@ -444,8 +446,6 @@ export default async function main(
);
status = 'linked';
}

rootDirectory = await inputRootDirectory(path, output, autoConfirm);
}

const sourcePath = rootDirectory ? join(path, rootDirectory) : path;
Expand Down

0 comments on commit 8cbf036

Please sign in to comment.