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

Selfupdate dumps garbage on console. #38

Closed
marc0der opened this issue Oct 17, 2012 · 3 comments
Closed

Selfupdate dumps garbage on console. #38

marc0der opened this issue Oct 17, 2012 · 3 comments
Assignees
Labels

Comments

@marc0der
Copy link
Member

The selfupdate command causes the script to overwrite itself with a new version. This causes bash to dump out the following to standard out.

/Users/omid/.gvm/bin/gvm: line 258: unexpected EOF while looking for matching `"'
/Users/omid/.gvm/bin/gvm: line 259: syntax error: unexpected end of file

Clean this up by writing standard out to /dev/null

@pledbrook
Copy link
Contributor

Ah, I saw this but didn't know how to reproduce. Glad you picked up on it.

@marc0der
Copy link
Member Author

The installation will be handled by a gvm-selfupdate script in the bin folder. This will prevent the gvm script from overwriting itself.

As part of this task, I'll also rework the installation of scripts by creating a zip file on the server side of all resources in the srv/scripts folder. The gvm-selfupdate script will then curl down the zip and unzip it into ~/.gvm/bin.

I was thinking about writing a gradle task to zip the files upfront, then pushing it to the heroku repo, but am very aware of the risk involved in forgetting to run this before pushing to heroku...

@ghost ghost assigned marc0der Oct 22, 2012
@marc0der
Copy link
Member Author

Lots of hacking to get this one working but I now have a descent (and clean) version up on the test environment. In short, we now have a /selfupdate endpoint that serves a script for downloading a zip binary containing the latest gvm scripts. This endpoint is curled, then invoked much like the installation procedure. This is done from within the selfupdate function in the gvm script.

The beauty of this is that the gvm script overwrite is now deferred to a different script, so we no longer see the annoying jumbled text when updating.

The downside is that to upgrade to this new version, the user will see jumbled text one last time on selfupdate.

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

No branches or pull requests

2 participants