Comments (7)
I assume your d
drive is another physical disk in the computer, as opposed to a mapped network drive?
from nvm-windows.
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.
Which version of Go did you use to run your test?
from nvm-windows.
e:\test\test> go version
go version go1.4.2 windows/amd64
from nvm-windows.
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.
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.
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)
- [Issue]: When Windows username contains umlaut the installer fails HOT 3
- [Issue]: Loading NVM in Git Bash shell takes 10+ seconds HOT 1
- [Issue]: spaces in the installation path of nvm lead to errors using it HOT 2
- [Issue]: unable to install latest node HOT 1
- [Issue]: Invalid settings generation on install when user name contains non-ASCII characters HOT 6
- [Issue]: npm install -g @vue/cli 'vue' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 HOT 1
- [Issue]: `nvm use` command does not select any version HOT 4
- [Issue]: version changing and alternative try install.ps1 file miss issue HOT 4
- [Issue]: nvm.exe hangs when started by TeamCity because Stdout is not a character mode device HOT 3
- [Issue]: Unable to accept license agreement on the installation dialog HOT 1
- [Issue]: Symlink seems not working in exFAT filesystem HOT 2
- [Issue]: An existing connection was forcibly closed by the remote host. HOT 3
- [Issue]: Doesn't function correctly when settings.txt isn't ascii format HOT 2
- [Issue]: npm i taking to long when running through nvm-windows HOT 1
- [Issue]: NVM for Windows should be run from a terminal such as CMD or PowerShell. HOT 3
- [Issue]: nvm use command does not select certain versions HOT 3
- [Issue]: Why did my Anaconda folder get deleted after installing NVM on Windows? All my environments are gone! HOT 18
- [Feature]: Add "Details" metadata to the nvm.exe HOT 1
- [Issue]: Get "https://nodejs.org/dist/latest-v18.x/SHASUMS256.txt": write tcp 10.0.0.10:59499->104.20.22.46:443: wsasend: An existing connection was forcibly closed by the remote host. HOT 8
- [Issue]: Windows Firewall Issue with nvm HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvm-windows.