Skip to content
This repository has been archived by the owner on Jul 18, 2020. It is now read-only.

Fix #2 from hydrogen-launcher #10

Merged
merged 2 commits into from
Oct 21, 2016
Merged

Conversation

Aaronmacaron
Copy link
Collaborator

@Aaronmacaron Aaronmacaron commented Oct 19, 2016

Link to issue: lgeiger/hydrogen-launcher#2

There are a lot more Terminals on Windows and a lot of them are actually used a lot because cmd is not that popular. So there may be a need for adding more terminals.

return `start ${terminal} /k "${_joinCommands(cwd, command, ' & ')}"`;
// Every terminal on Windows has its own arguments.
var args = {
cmd: '/k',
Copy link
Member

Choose a reason for hiding this comment

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

Should this be cmd.exe?

Copy link
Member

Choose a reason for hiding this comment

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

cmd works too. But I think we should support cmd.exe as well.

Copy link
Member

@rgbkrk rgbkrk Oct 19, 2016

Choose a reason for hiding this comment

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

Ok. The reason I brought it up was because of the Travis config. Should we adapt it here or adapt Travis?

We can adapt it here with:

args['cmd.exe'] = args.cmd;

so that we're not duplicating the arguments for what is really the same binary.

Copy link
Member

Choose a reason for hiding this comment

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

I think we should adapt it here to allow the user to pass either cmd or cmd.exe. I don't know if we should do this for powershell and cmder as well.

@rgbkrk
Copy link
Member

rgbkrk commented Oct 19, 2016

Thanks for the PR!

powershell: '-NoExit'
};
var term = terminal.toLowerCase().trim();
return `start ${terminal} ${args[term]} "${_joinCommands(cwd, command, ' & ')}"`;
Copy link
Member

Choose a reason for hiding this comment

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

What happens if term isn't in args?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, I didn't think about that case. We could set a default but in most cases, it won't work because the default argument won't work in most terminals.

Copy link
Member

Choose a reason for hiding this comment

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

I think we could just use no argument in that case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That'd be possible but the majority of terminals just pop up and then close immediately if you're not specifying a specific argument.

Copy link
Member

Choose a reason for hiding this comment

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

That's true. But I think we should try it. We can always add more terminals later.

Copy link
Member

Choose a reason for hiding this comment

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

The reason @lgeiger is suggested taking a look at when term isn't in args is that it's why the tests are currently failing. This can be remedied by adding cmd.exe (in addition to cmd) as suggested earlier or by adapting the tests.

Copy link
Member

@lgeiger lgeiger left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your PR! 🎉

Could you update the tests as well so travis is happy.

@lgeiger
Copy link
Member

lgeiger commented Oct 19, 2016

Oh sorry my comment about updating the tests was wrong.
Though if you like you could add a test for the case that a terminal other than cmd, cmder or powershell is passed into the function.

Copy link
Collaborator Author

@Aaronmacaron Aaronmacaron left a comment

Choose a reason for hiding this comment

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

Works now with and without .exe suffix. Tests are working. And I set "/k" as the default because cmd is the default terminal.

@rgbkrk
Copy link
Member

rgbkrk commented Oct 20, 2016

I'll leave this to @lgeiger to merge and release. Thanks again for the PR and incorporating feedback @Aaronmacaron!

@lgeiger
Copy link
Member

lgeiger commented Oct 21, 2016

@Aaronmacaron Thanks a lot for your work!

@lgeiger lgeiger merged commit 241da1b into nteract:master Oct 21, 2016
@lgeiger
Copy link
Member

lgeiger commented Oct 21, 2016

@Aaronmacaron Would you like to join us and help maintain term-launcher and hydrogen-launcher?

@Aaronmacaron
Copy link
Collaborator Author

@lgeiger What does it mean to maintain term-launcher and hydrogen-launcher? What tasks does this include? I'm very new to Github and Contributing to OpenSource Projects and I've never done something like maintaining an OpenSource Project. So I'm not sure if I'm qualified for this. Neither am I familiar with term-launcher and hydrogen-launcher. I came accidentally across term-launcher.

But in general, that sounds very interesting.

@rgbkrk
Copy link
Member

rgbkrk commented Oct 22, 2016

We bring you onto the org in nteract as a member, and if/when you have time to review pull requests or issues you bear the privilege and burden of being able to merge PRs, close issues, etc. It's mostly about making sure that we scale out as humans so that it's not just me and Lukas on this package.

The other way of putting it is that we enjoyed working with you so much that we want to gift you the same responsibilities we bear. 😉

@Aaronmacaron
Copy link
Collaborator Author

That sounds great. I'd really like to help you out maintaining those projects.

@lgeiger
Copy link
Member

lgeiger commented Oct 23, 2016

Great to have you on board 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants