init setup didn't work #65

Open
opened 2026-03-24 12:46:49 +00:00 by sameh-farouk · 0 comments
Member

follwing the setup instrcutions, the install script didn't configure the modules.

~/hero/code/hero_skills> init setup
Error: nu::shell::external_command

  × External command failed
   ╭─[repl_entry #1:1:1]
 1 │ init setup
   · ──┬─
   ·   ╰── Command init not found
   ╰────
  help: Did you mean into int?

~/hero/code/hero_skills>                                                                                                                                                               1 03/24/2026 01:57:57 PM

I had to set them up manually

nu /Users/abouelsaad/hero/code/hero_skills/tools/install.nu

Bug details:

When install.nu is run via nu /path/to/install.nu, $env.FILE_PWD is not set (it's only set when a script is sourced, not when run as nu <file>). And TOOLS_DIR isn't set either. So it falls back to pwd, which is $REPO_DIR (set by cd "$REPO_DIR" on line 26/50), not $REPO_DIR/tools, So the glob for modules/*.nu finds nothing and no modules get registered.

follwing the setup instrcutions, the install script didn't configure the modules. ```sh ~/hero/code/hero_skills> init setup Error: nu::shell::external_command × External command failed ╭─[repl_entry #1:1:1] 1 │ init setup · ──┬─ · ╰── Command init not found ╰──── help: Did you mean into int? ~/hero/code/hero_skills> 1 03/24/2026 01:57:57 PM ``` I had to set them up manually ``` nu /Users/abouelsaad/hero/code/hero_skills/tools/install.nu ``` Bug details: When install.nu is run via `nu /path/to/install.nu`, `$env.FILE_PWD` is not set (it's only set when a script is sourced, not when run as `nu <file>`). And `TOOLS_DIR` isn't set either. So it falls back to pwd, which is `$REPO_DIR` (set by `cd "$REPO_DIR"` on line 26/50), not `$REPO_DIR/tools`, So the glob for `modules/*.nu` finds nothing and no modules get registered.
sameh-farouk changed title from TOOLS_DIR isn't set and glob for modules/*.nu finds nothing and no modules get registered to init setup didn't work 2026-03-24 12:49:50 +00:00
sameh-farouk removed their assignment 2026-03-24 15:38:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_skills#65
No description provided.