-
Notifications
You must be signed in to change notification settings - Fork 48
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
Beautify apps commands #862
base: master
Are you sure you want to change the base?
Conversation
🔎 A preview has been automatically published:
This preview will be deleted once this PR is closed. |
19a6848
to
022b809
Compare
022b809
to
5f1d3cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, it's really a better output :+1.
I only looked at the code and LGTM with just a few questions.
*/ | ||
export function isGitRepo () { | ||
try { | ||
childProcess.execSync('git rev-parse --is-inside-work-tree', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we start assuming user has got git
binary on its machine.
This is something we need to document. I feel like it is a breaking change right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made it as is, we can also check if git is here, if not, don't print anything related. But as the user need a git repo with commits, I think it's could be better to print a warning if no git is found.
I think we already tell in doc git is mandatory, but we can insist more on this.
.catch(async (e) => { | ||
const isShallow = await git.isShallow(); | ||
if (isShallow) { | ||
throw new Error('Failed to push your source code because your repository is shallow and therefore cannot be pushed to the Clever Cloud remote.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be interested in the reason of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was there before. My point here was mainly to change how things are printed, not how the CLI works (except to add some info about git repo):
clever-tools/src/commands/deploy.js
Line 73 in fed085e
const isShallow = await git.isShallow(); |
This PR tries to enhance the way information are printed to the user in application management, adding instructions/tips/link when useful. Feel free to test it, discuss choices made.