I really enjoy your npm pagage node-os-utils, but I ran into some problems using osu.drive functions. It kept throwing Error: disk name invalid and / not found.
So I did some debugging and found out, that you are using the df -kP command, to gather plain text information about free disk space.
After that you parse that information by using the headline column names and iterating through the rows looking for lines[i]['Mounted on'] === diskName. But this works only if the shell is running in english and df prints out an english headline. Which sadly isn't the case with me (it's german):
For international support I whould like to suggest two possible fixes / updates:
I really enjoy your npm pagage node-os-utils, but I ran into some problems using
osu.drive
functions. It kept throwingError: disk name invalid and / not found
.So I did some debugging and found out, that you are using the
df -kP
command, to gather plain text information about free disk space.After that you parse that information by using the headline column names and iterating through the rows looking for
lines[i]['Mounted on'] === diskName
. But this works only if the shell is running in english anddf
prints out an english headline. Which sadly isn't the case with me (it's german):For international support I whould like to suggest two possible fixes / updates:
Changing line 43 of /lib/drive.js to
which whould set the language of the child process to english, so you can expect
df
to output a english headline.Changing line 12 of /lib/exec.js to
which whould set the language of all child processes to english, so you can expect all command outputs to be english as well.
Merry Christmas from Niklas Englert in Germany
(sorry for bad english)