Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat arg project init #868

Merged

Conversation

byawitz
Copy link
Member

@byawitz byawitz commented May 31, 2024

What does this PR do?

Allowing project creation using a single command

Test Plan

image

@byawitz byawitz changed the base branch from master to feat-multiple-accounts-and-instances May 31, 2024 19:40
@byawitz byawitz requested review from Meldiron and christyjacob4 June 7, 2024 01:51
@byawitz byawitz marked this pull request as ready for review June 7, 2024 01:51
}

} else {
answers = await inquirer.prompt(questionsInitProject)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. What if we did different approach?
We start with empty "answers" object.. We try to fill ith with params from CMD, only using what is provided. We then take questionsInitProject and filter out questions that we already have answer for. Then, we show remaining questions and fill them into our answers object. If all answers were already given with params, there is no need to ask questions all-together

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

refactor: Improve command line to use `rawArgs`
Comment on lines 68 to 76
if (open) {
const start = (process.platform == 'darwin' ? 'open' : process.platform == 'win32' ? 'start' : 'xdg-open');
cp.exec(`${start} ${url}`);

cp.exec(`${start} ${url}`, (err, stdout, stderr) => {
if (err !== null) {
console.log('\n');
error('Opening in default browser. ' + err)
}
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this --open option? I think it might cause more problems than we are trying to solve. Does xdg-open work on all linux distros?

I think we can save this trouble altogether by removing the open param. We can just display the link with the --console flag and people can just click it.

@christyjacob4 christyjacob4 merged commit fcb2ddc into feat-multiple-accounts-and-instances Jun 11, 2024
35 checks passed
@christyjacob4 christyjacob4 deleted the feat-arg-project-init branch June 11, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants