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

First run of esy-bash has extraneous output #29

Closed
bryphe opened this issue Oct 23, 2018 · 4 comments
Closed

First run of esy-bash has extraneous output #29

bryphe opened this issue Oct 23, 2018 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@bryphe
Copy link
Collaborator

bryphe commented Oct 23, 2018

This causes failures like this the with this build:

error: sha1 checksum mismatch: expected 59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46 but got Copying
  fetching archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46
esy: exiting due to errors above

(The extra output broke the result parsing!)

@bryphe
Copy link
Collaborator Author

bryphe commented Oct 26, 2018

The output that breaks us is stuff like:

Copying skeleton files.
These files are for the users to personalise their cygwin experience.
They will never be overwritten nor automatically updated.
'./.bashrc' -> '/home/appveyor//.bashrc'
'./.bash_profile' -> '/home/appveyor//.bash_profile'
'./.inputrc' -> '/home/appveyor//.inputrc'
'./.profile' -> '/home/appveyor//.profile'

@ManasJayanth
Copy link
Member

ManasJayanth commented Oct 26, 2018

Unfortunately, I couldn't repro this locally on my machine. Still looking into it.

@bryphe
Copy link
Collaborator Author

bryphe commented Nov 1, 2018

Thanks for testing it out @prometheansacrifice !

I think the issue is that, if you don't have a .bashrc/.bash_profile etc already, the first run of bash will create - this breaks the output we expect! So it might not repro locally if you already have those in your home directory.

I think there are a couple things we need to do here:

  • Explicitly set the home directory - we can set this in the /etc/nsswitch.conf. We can set the home directory by using db_home. We could set it like: db_home: /usr/esy. We could include this modified /etc/nsswitch.conf in our bundle.
  • Seed the home directory with the requisite scripts - we could just run bash.exe prior to packing to get the .bashrc/.bash_profile/etc generated

Explicitly setting the db_home here will help get the esy/cygwin isolated from another environment the user may have.

This solution would also address #15

@bryphe bryphe added the help wanted Extra attention is needed label Nov 1, 2018
@ManasJayanth ManasJayanth self-assigned this Nov 2, 2018
@bryphe
Copy link
Collaborator Author

bryphe commented Nov 8, 2018

Fixed by #35 - thank you @prometheansacrifice ! 💯

@bryphe bryphe closed this as completed Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants