Skip to content

Error: nu::shell::io::directory_not_found when the files/scripts folder does not exist #531

@mikaelvz

Description

@mikaelvz

Around 2 weeks ago my build failed on https://github.com/mikaelvz/silverblue.
The error was :

l/bluefin-dx-kled:latest => ============================ Start 'script' Module ============================
l/bluefin-dx-kled:latest => Error: nu::shell::io::directory_not_found
l/bluefin-dx-kled:latest => 
l/bluefin-dx-kled:latest =>   × Directory not found
l/bluefin-dx-kled:latest =>     ╭─[/tmp/modules/script/script.nu:10:6]
l/bluefin-dx-kled:latest =>   9 │   let script_dir = [$env.CONFIG_DIRECTORY scripts] | path join
l/bluefin-dx-kled:latest =>  10 │   cd $script_dir
l/bluefin-dx-kled:latest =>     ·      ─────┬─────
l/bluefin-dx-kled:latest =>     ·           ╰── Directory not found
l/bluefin-dx-kled:latest =>  11 │   glob ./**/*{.sh,.nu,.py}
l/bluefin-dx-kled:latest =>     ╰────
l/bluefin-dx-kled:latest =>   help: '/tmp/files/scripts' does not exist
l/bluefin-dx-kled:latest => 
l/bluefin-dx-kled:latest => ============================ Failed 'script' Module ============================

Adding an empty folder scripts in files folder resolved the problem on this commit (mikaelvz/silverblue@cc83472).

As scripts is not required in script module someone may have the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions