bevry / dorothy

🧙🏻‍♀️ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.
Other
277 stars 21 forks source link

syntax error near unexpected token `) #228

Closed joshuacox closed 4 weeks ago

joshuacox commented 4 weeks ago

during setup-system install I have run into this sort of corrupted setup.bash file.

┌  Setup Node.js  ┐
The [node] utility is marked for upgrade. Upgrading... ⏲
┌  Install Node.js via System  ┐
Installed: v22.2.0
└  Install Node.js via System  ┘
┌  Clean Node.js versions and packages  ┐
Now using system version of node: v22.2.0 (npm v10.8.1)
Uninstalled: v20.14.0
nvm: Cannot uninstall currently-active node version, v22.2.0 (inferred from 22.2.0).
└  Clean Node.js versions and packages  ┘
┌  Clean Node.js Version Manager (NVM) instead  ┐
└  Clean Node.js Version Manager (NVM) instead  ┘
┌  Install Node.js Version Manager (NVM)  ┐
NVM_DIR=/home/thoth/.nvm
└  Install Node.js Version Manager (NVM)  ┘
┌  Install Node.js via NVM  ┐
Installs active and LTS versions.
Installed: v20.14.0
Installed: v22.2.0
└  Install Node.js via NVM  ┘
┌  Upgrade npm  ┐
Before: v10.7.0
After:  v10.8.1
└  Upgrade npm  ┘
The [node] utility was upgraded via [eval]
The [node] utility was upgraded. ✅
┌  Configure npm  ┐
└  Configure npm  ┘
The [gopls] utility is already installed. ✅
The [Delve] utility is already installed. ✅
The [golangci-lint] utility is already installed. ✅
└  Setup Go  ┘
/home/user1/.local/share/dorothy/user/config/setup.bash: line 1: syntax error near unexpected token `)'

looking in this file is some truncated half dead file:

)
GO_LINTING_INSTALL='yes'

removing it, and re-running

setup-system install

nets the same results, and the above strange setup.bash file is recreated in its half dead state.

balupton commented 4 weeks ago

Thank you for the report.

Can you attach a copy of your setup.bash file in a gist or email it to b@bevry.me if it is private, as there likely is something in there that https://github.com/bevry/dorothy/blob/master/commands/dorothy-config and https://github.com/bevry/dorothy/blob/master/commands/config-helper are struggling with.

joshuacox commented 4 weeks ago

@balupton unfortunately the entirety of the file was what I had posted earlier

)
GO_LINTING_INSTALL='yes'

and while repeatable at the time, I just began doing all the individual jobs like setup-utils etc individually. I can now do the install successfully without it failiing (*with the exception that I cannot seem to include ksh without it freezing, but that is perphaps a separate issue). Unfortunately, I am unable to nail down the exact cause. I am going to close for now, I will re-open if I can uncover any more information.

EDIT: in addition to this setup on arch linux I am mirroring all of the rc files into a NixOS install and will try and help with that issue as well if i can get more information on things are failing in nixos.