Git Product home page Git Product logo

Comments (7)

coreybutler avatar coreybutler commented on May 11, 2024

I assume your d drive is another physical disk in the computer, as opposed to a mapped network drive?

from nvm-windows.

cckowin avatar cckowin commented on May 11, 2024

no, my computer has only one physical disk
i download the go and try the code my self
the test code is below:

package main
import "os"

func main() {
    os.Rename("e:\\test\\test\\test_a", "e:\\test\\test\\test_b");
    os.Rename("e:\\test\\test\\test_b", "d:\\test_b"); //not working
    os.Rename("e:\\test\\test\\test_file_a", "d:\\test_file_a");
}

test_a is a directory, test_file_a is a file
and the result is os.Rename works when rename files between two partiton, and
not work when rename directories between two partion

from nvm-windows.

coreybutler avatar coreybutler commented on May 11, 2024

Which version of Go did you use to run your test?

from nvm-windows.

cckowin avatar cckowin commented on May 11, 2024
e:\test\test> go version
go version go1.4.2 windows/amd64

from nvm-windows.

inoc603 avatar inoc603 commented on May 11, 2024

ran into the same issue on windows8.1, with go 1.4.2. I tried to catch the err with:

err := os.Rename(os.TempDir()+"\\nvm-npm\\npm-"+npmv,env.root+"\\v"+version+"\\node_modules\\npm")
 if err != nil {
    fmt.Println(err)
    os.Exit(1)
}

And it turned out there is one:
Installing npm v2.5.1...rename C:\Users\MY_USERNAME\AppData\Local\Temp\nvm-npm\npm-2.5.1 E:\nvm\v0.12.0\node_modules\npm: Access is denied.

from nvm-windows.

inoc603 avatar inoc603 commented on May 11, 2024

Update

I made some change to fix the problem. Instead of using system temp dir, I created a new directory temp under the nvm root and do all the work there.

I changed func GetNpm(v string) to func GetNpm(root string, v string), pass the nvm root path like in func GetNodeJS(root string, v string, a string).

Works fine.

I'll make a pull request soon. In fact this is the first time I write sth in Go, never touched it before trying to solve this problem. Hopefully I'm coding in the right manner, really know little about Go.

from nvm-windows.

 avatar commented on May 11, 2024

Hello to all of you, First of all thx for this great tool. Second: Nice seeing that this fix is already incooperated into the codebase because it hit me today as well. Are there any plans (especially a date) when a new release of the node-nvm will land?

from nvm-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.