onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
236 stars 26 forks source link

dcli install fails with stat command #139

Closed bsutton closed 2 years ago

bsutton commented 3 years ago

when running dcli install on some linux systems it fails with:


Creating Template directory in: /home/bsutton/.dcli/templates.

Creating Cache directory in: /home/bsutton/.dcli/cache.

Creating bin directory in: /home/bsutton/.dcli/bin.

dcli tab completion installed. Restart your terminal to activate it.
dcli found in : /home/bsutton/.pub-cache/bin/dcli.
RunException: stat -L -c %a %G %U /usr/bin/dcli 
exit: 1
reason: The command [stat] with args [-L, -c, %a %G %U, /usr/bin/dcli] failed with exitCode: 1 
Stacktrace: wait_for_ex.dart : waitForEx : 47
runnable_process.dart : RunnableProcess.processUntilExit : 408
runnable_process.dart : RunnableProcess.run : 161
run.dart : start : 227
string_as_process.dart : StringAsProcess.toList : 276
string_as_process.dart : StringAsProcess.firstLine : 341
is.dart : _Is._checkPermission : 161
is.dart : _Is.isWritable : 135
is.dart : isWritable : 84
install.dart : InstallCommand.symlinkDCli : 228
jayvdb commented 3 years ago

I am encountering this on mac, which /usr/bin/stat is stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]

In this case gstat is likely needed from brew.

bsutton commented 3 years ago

Yes I found the same issue on a gcloud instance just last week.

I'm going to see if I can replace it with a posix call.

On Wed, 5 May 2021, 7:05 am John Vandenberg, @.***> wrote:

I am encountering this on mac, which /usr/bin/stat is stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]

In this case gstat is likely needed from brew.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bsutton/dcli/issues/139#issuecomment-832248324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG32OETZ3PFRQILCIUFJ2DTMBOSDANCNFSM4372KU5A .

bsutton commented 2 years ago

This issue has now been resolved on both linux and macos. We are now using the posix api stat rather than spawning the stat command.