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

Solving error launched running command gtt config #113

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jmeneuh
Copy link

@jmeneuh jmeneuh commented Jun 5, 2020

If neither EDITOR not VISUAL environnement variables are set an exception will be launched after running gtt config command. The modification runs "vi" editor as default if it is the case.

@coveralls
Copy link

coveralls commented Jun 5, 2020

Coverage Status

Coverage remained the same at 65.979% when pulling 9e070d9 on jmeneuh:fix_editor_branch into c4692a5 on kriskbx:master.

@Pablohn26
Copy link
Contributor

This PR fix #96

@cgdobre cgdobre linked an issue Jun 7, 2020 that may be closed by this pull request
@cgdobre cgdobre self-assigned this Jun 7, 2020
cgdobre
cgdobre previously requested changes Jun 7, 2020
Comment on lines 28 to 34
if (!editor && !(editor = process.env.EDITOR)) {
editor = "vi";
}

return child_process.spawn(editor, [file], {
stdio: 'inherit'
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi! Thanks for your contribution. What you suggest would not work on Windows unfortunately. What do you think of bumping the open package from 0.0.5 to 7.0.4 and using:

Suggested change
if (!editor && !(editor = process.env.EDITOR)) {
editor = "vi";
}
return child_process.spawn(editor, [file], {
stdio: 'inherit'
});
if (editor || (editor = process.env.EDITOR)) {
return child_process.spawn(editor, [file], {
stdio: 'inherit'
});
} else {
return async () => await open(file);
}

cgdobre added a commit that referenced this pull request Jun 7, 2020
all yarn-check contents
- except open as it is handled in PR #113
- except csv-string as compatibility is unclear
cgdobre added 2 commits July 1, 2020 12:35
better to use this as vi may not be available on windows
fix merge error
@cgdobre cgdobre dismissed their stale review July 1, 2020 09:40

committed suggested changes

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.

gtt config throws error when EDITOR variable is not set
5 participants