V: cannot move files with mv ,directory is empty after running code

Created on 29 Aug 2020  路  3Comments  路  Source: vlang/v

hey ive check this

https://github.com/vlang/v/blob/master/doc/docs.md#cross-platform-shell-scripts-in-v

so i tried to create a simple script
i created a test.xt file

and a script deploy.vsh

#!/usr/bin/v run

mkdir('build')
mv('test.txt','build/')

im running it on my arch with this command

./deploy.vsh && ./deploy

ive check the build directory no file test.txt

looks like the os module is still not working properly for basic scripting....

i would love to try porting all my script to vlang but with this situation its impossible

Bug

All 3 comments

As per Discord chat, @Larpon I agree, this should behave like a Unix mv since that would seem most universally predictable.

@ylluminate - super. PR #6300 is ready

@codeitlikemiley let us know if you have any more trouble!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

radare picture radare  路  3Comments

shouji-kazuo picture shouji-kazuo  路  3Comments

ArcDrake picture ArcDrake  路  3Comments

elimisteve picture elimisteve  路  3Comments

PavelVozenilek picture PavelVozenilek  路  3Comments