Skip to content

[Hyper-cli] Add cli cmd#2342

Closed
chabou wants to merge 11 commits into
vercel:canaryfrom
chabou:add_cli_cmd
Closed

[Hyper-cli] Add cli cmd#2342
chabou wants to merge 11 commits into
vercel:canaryfrom
chabou:add_cli_cmd

Conversation

@chabou
Copy link
Copy Markdown
Contributor

@chabou chabou commented Oct 10, 2017

Replace #2337

DO NOT MERGE IT. This feature was created to make review easier.
This PR is already merged in #2375 branch (the only one that should be merged).

  • Hyper CLI javascript file is bootstrapped by scripts (located in build/(mac|win|linux)/)
  • Right platform script(s) are copied at build time to resources/bin/
  • When installing Hyper on Linux, platform script is symlinked to /usr/local/bin.
  • At Hyper startup time (only in production mode), platform script is symlinked to /usr/local/bin on Mac, or resources/bin is added to user PATH env var on Windows.

@chabou chabou mentioned this pull request Oct 18, 2017
15 tasks
@chabou
Copy link
Copy Markdown
Contributor Author

chabou commented Oct 19, 2017

There is a caveat with Windows.

I correctly add hyper bin path to user path. But there is some cache mechanism. User should go to "Modify user env var" dialog and just hit ok button (or reboot his computer :trollface: )

@chabou
Copy link
Copy Markdown
Contributor Author

chabou commented Oct 30, 2017

There is an error on Linux

Failed to symlink Hyper CLI { Error: EACCES: permission denied, unlink '/usr/local/bin/hyper'
  errno: -13,
  code: 'EACCES',
  syscall: 'unlink',
  path: '/usr/local/bin/hyper' }
parallels@ubuntu:~/hyper$ ls -lah /usr/local/bin/
total 8.0K
drwxr-xr-x  2 root root 4.0K Oct 23 00:02 .
drwxr-xr-x 10 root root 4.0K Jul 19  2016 ..
lrwxrwxrwx  1 root root   16 Oct 23 00:02 hyper -> /opt/Hyper/hyper

I don't think that electron-builder can execute postinstall scripts.

I don't know how to resolve this.
Possible workaround:

  • rename Hyper CLI command to hyper-cli or hpm or hyperctl
  • Embed CLI handling directly in Hyper (but deal with unique app instance restriction)

Any thought @rauchg @leo @Qix- @albinekb @CodeTheory @Stanzilla @derrickpelletier ?

@Stanzilla
Copy link
Copy Markdown
Contributor

I kinda liked hpm, my other idea was more of a joke but we could use a unicode symbol in the app name 😸

@chabou chabou changed the base branch from feat/hyper-cli to canary November 2, 2017 21:20
@chabou
Copy link
Copy Markdown
Contributor Author

chabou commented Nov 2, 2017

I was wrong! I found how to execute postinstall script with electron-builder 🎉 🎉 🎉
See afterInstall option.

@chabou chabou added the 👩‍🔬 Status: In Progress Issue or PR is currently active and work is in progress label Nov 2, 2017
@chabou
Copy link
Copy Markdown
Contributor Author

chabou commented Jan 9, 2018

Merged with #2375

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👩‍🔬 Status: In Progress Issue or PR is currently active and work is in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants