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

specify kernel name when starting new kernel #4

Merged
merged 1 commit into from
Apr 10, 2019
Merged

Conversation

amn41
Copy link
Contributor

@amn41 amn41 commented Apr 6, 2019

Closes #3 (at least insofar as I experienced this issue).

Steps to reproduce:

Create a juniper object:

   <pre data-executable>echo "hello"</pre>
   <script src="juniper.min.js"></script>
   <script>
     new Juniper({ repo: 'amn41/bash_plus_kernel/', branch: 'master', kernelType: 'bash', language: 'shell' })
   </script>

Attempting to run this will result in a SytaxError because the kernel is python3 by virtue of the default kernel name. Applying this patch fixes the issue & the command executes correctly.

I re-used the this.kernelType option rather than introducing a new 'name' option because as far as I can tell they are equivalent. Though there could be edge cases where these differ I'm just not aware of them.

@ines
Copy link
Owner

ines commented Apr 10, 2019

@amn41 Thanks, looks good! 👍 And yes, I think I just didn't realise the kernel type had to be passed into startNew as well (because it just quietly defaulted to Python).

I'll merge this and try to get another release up on npm and not procrastinate on this. (No idea what it is, but I really hate JS/Node/npm packaging and publishing 😫 I tried to get a package juniper-react building but it just wouldn't work, so I gave up.)

@ines ines merged commit c504478 into ines:master Apr 10, 2019
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.

use for other languages than python
2 participants