scriptcs-contrib / svm

scriptcs version manager
Apache License 2.0
43 stars 13 forks source link

svm install latest doesn't set active version #62

Closed jchannon closed 9 years ago

jchannon commented 9 years ago

Hi,

Just starting out with this.

I ran svm install latest and it installed 0.13.3 but when I type scriptcs it says No active scriptcs found. Use 'svm use <version>' to set the active scriptcs version.

If I type svm list -a it shows 0.13.3 is the active installation which is a bit odd.

If I type svm use 0.13.3 then scriptcs it still says No active scriptcs found. Use 'svm use <version>' to set the active scriptcs version.

I'm on OSX and zsh terminal, any ideas?

jchannon commented 9 years ago

Looking at the scriptcs shim these are the results from executing the variables

#!/bin/bash

SCRIPT_PATH="${BASH_SOURCE[0]%/*}"                                        # /.svm/shims

echo $SCRIPT_PATH

SVM_PATH=${SCRIPT_PATH%/shims}                                            # /.svm/

echo $SVM_PATH

VERSIONS_PATH="$SVM_PATH/versions"                                        # /.svm/versions

echo $VERSIONS_PATH

VERSION_FILE_PATH="$SVM_PATH/version"                                     # /.svm/version

The results dont match the commented out paths:

/Users/jonathan/.svm/shims/
/Users/jonathan/.svm/shims/
/Users/jonathan/.svm/shims//versions
/Users/jonathan/.svm/shims//version
paulbouwer commented 9 years ago

@jchannon The trailing / in /Users/jonathan/.svm/shims/ seems to be causing the problem. I also ran into this when testing the new shebang support on Linux but have never seen it outside that scenario.

The fix coming in #60 - Update shim for use with ShebangLineProcessor will resolve your issue.

I've used scriptcs on Linux and OSX and haven't seen this issue before. I'm not sure as to why in certain scenarios a trailing / is coming through on $SCRIPT_PATH. But the fix will definitely resolve this issue for multiple scenarios.

Add the following line after the SCRIPT_PATH="${BASH_SOURCE[0]%/*}" line to get you up and running while I finish up the next release:

SCRIPT_PATH="${SCRIPT_PATH%/}"
jchannon commented 9 years ago

Thanks. I hardcoded it for now :)

I was trying to do a PR for the scriptcs website to make reference to svm but couldn't see where

On Saturday, 21 March 2015, Paul Bouwer notifications@github.com wrote:

@jchannon https://github.com/jchannon The trailing / in /Users/jonathan/.svm/shims/ seems to be causing the problem. I also ran into this when testing the new shebang support on Linux but have never seen it outside that scenario.

The fix coming in #60 - Update shim for use with ShebangLineProcessor https://github.com/scriptcs-contrib/svm/issues/60 will resolve your issue.

I've used scriptcs on Linux and OSX and haven't seen this issue before. I'm not sure as to why in certain scenarios a trailing / is coming through on $SCRIPT_PATH. But the fix will definitely resolve this issue for multiple scenarios.

Add the following line after the SCRIPT_PATH="${BASH_SOURCE[0]%/*}" line to get you up and running while I finish up the next release:

SCRIPT_PATH="${SCRIPT_PATH%/}"

Reply to this email directly or view it on GitHub https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84458684.

paulbouwer commented 9 years ago

I need to raise the visibility on the scriptcs website. Hope to do this after the next release of svm.

On Sun, Mar 22, 2015 at 8:18 AM, Jonathan Channon notifications@github.com wrote:

Thanks. I hardcoded it for now :)

I was trying to do a PR for the scriptcs website to make reference to svm but couldn't see where

On Saturday, 21 March 2015, Paul Bouwer notifications@github.com wrote:

@jchannon https://github.com/jchannon The trailing / in /Users/jonathan/.svm/shims/ seems to be causing the problem. I also ran into this when testing the new shebang support on Linux but have never seen it outside that scenario.

The fix coming in #60 - Update shim for use with ShebangLineProcessor https://github.com/scriptcs-contrib/svm/issues/60 will resolve your issue.

I've used scriptcs on Linux and OSX and haven't seen this issue before. I'm not sure as to why in certain scenarios a trailing / is coming through on $SCRIPT_PATH. But the fix will definitely resolve this issue for multiple scenarios.

Add the following line after the SCRIPT_PATH="${BASH_SOURCE[0]%/*}" line to get you up and running while I finish up the next release:

SCRIPT_PATH="${SCRIPT_PATH%/}"

Reply to this email directly or view it on GitHub <https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84458684 .

— Reply to this email directly or view it on GitHub https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84462129.

jchannon commented 9 years ago

Cool! Svm is looking cool

On Saturday, 21 March 2015, Paul Bouwer notifications@github.com wrote:

I need to raise the visibility on the scriptcs website. Hope to do this after the next release of svm.

On Sun, Mar 22, 2015 at 8:18 AM, Jonathan Channon < notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Thanks. I hardcoded it for now :)

I was trying to do a PR for the scriptcs website to make reference to svm but couldn't see where

On Saturday, 21 March 2015, Paul Bouwer <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

@jchannon https://github.com/jchannon The trailing / in /Users/jonathan/.svm/shims/ seems to be causing the problem. I also ran into this when testing the new shebang support on Linux but have never seen it outside that scenario.

The fix coming in #60 - Update shim for use with ShebangLineProcessor https://github.com/scriptcs-contrib/svm/issues/60 will resolve your issue.

I've used scriptcs on Linux and OSX and haven't seen this issue before. I'm not sure as to why in certain scenarios a trailing / is coming through on $SCRIPT_PATH. But the fix will definitely resolve this issue for multiple scenarios.

Add the following line after the SCRIPT_PATH="${BASH_SOURCE[0]%/*}" line to get you up and running while I finish up the next release:

SCRIPT_PATH="${SCRIPT_PATH%/}"

Reply to this email directly or view it on GitHub < https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84458684 .

Reply to this email directly or view it on GitHub <https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84462129 .

Reply to this email directly or view it on GitHub https://github.com/scriptcs-contrib/svm/issues/62#issuecomment-84462272.

paulbouwer commented 9 years ago

Next release will be big - finally getting initial API support in - no more hardcoded scriptcs versions.

paulbouwer commented 9 years ago

This will be fixed by #60.

jchannon commented 9 years ago

out of interest how will i know when theres a new release for svm, is there a svm upgrade type thing?

paulbouwer commented 9 years ago

@jchannon there is an issue for that - #17. But I'm about to overhaul svm and move to a common codebase for Windows, Linux and OSX. So this issue will become part of that update.

For now the process will be to see twitter notification of new version from @scriptcs_svm and run the install again - this will perform an in-place upgrade.