dx
dx copied to clipboard
Can't change the shell before `id` is ran, forces a requirement on `bash` (and `id`)
This section at the bottom of mod.ts runs when imported:
https://github.com/linux-china/dx/blob/master/mod.ts#L451-L459
This is before you can change $.shell to something other than bash such as sh
This means that you must have bash available in order to use sh/ash/dash etc
Also it adds a dependency on id just to set the UID env var which doesn't look useful outside of the test function
https://github.com/linux-china/dx/blob/master/mod.ts#L366-L374
@06kellyjac yes, you are right, and I moved GID and UID into test method
I suppose this also means we cannot use this on Windows yet, correct?
Failed to execute id command: {
exitCode: 2,
stdout: "",
stderr: "-bash: line 2: syntax error near unexpected token `x86'\n-bash: line 2: `HOMEDRIVE=\"C:\"; PROCESSOR_RE..."
}
git bash/mingw on windows might work