Skip to content

config nu fails on windows "External command failed" #6646

Closed

Description

@NogrTL

Describe the bug

While trying to run config nu received error

Error: nu::shell::external_command (link)

  × External command failed
   ╭─[source:1:1]
 1 │ nu
   · ▲
   · ╰── can't run executable
   ╰────
  help: program not found

How to reproduce

  1. Run config nu

Expected behavior

Open config?

Screenshots

image

Configuration

key value
version 0.69.1
branch
commit_hash 8a5abc7
build_os windows-x86_64
build_target x86_64-pc-windows-msvc
rust_version rustc 1.64.0 (a55dd71d5 2022-09-19)
rust_channel stable-x86_64-pc-windows-msvc
cargo_version cargo 1.64.0 (387270bc7 2022-09-16)
pkg_version 0.69.1
build_time 2022-09-28 02:58:08 +00:00
build_rust_channel release
features database, dataframe, default, trash, which, zip
installed_plugins

Additional context

No response

Activity

  1. added
    category:bug
    A:error-unhelpful
    on Sep 30, 2022
  2. sholderbach commented on Sep 30, 2022

    @sholderbach
    Member

    OK, can reproduce this under a certain condition. This is the result of it looking for a text editor specified either via the config.buffer_editor setting or the EDITOR or VISUAL environment variables and failing to locate that in the PATH.
    The error message is absolutely misleading and should not highlight nu and instead report details about the editor we search for.

  3. fdncred commented on Sep 30, 2022

    @fdncred
    Contributor

    maybe we should default to notepad on windows. I haven't looked but maybe it defaults to nano even on windows?

  4. sholderbach commented on Sep 30, 2022

    @sholderbach
    Member

    I think we do already, at least on the Rust side. Don't know, if our overly eager default config overwrites this.

  5. NogrTL commented on Sep 30, 2022

    @NogrTL
    Author

    I know the answer...In new version's of Windows 10, you can remove it(Notepad). I guess that's the problem

  6. fdncred commented on Sep 30, 2022

    @fdncred
    Contributor

    oh ya, good point @NogrTL. Is there another editor that we can rely on to be on windows?

  7. NogrTL commented on Sep 30, 2022

    @NogrTL
    Author

    I would suggest, to dig into file-types and protocols handlers.

    It's more of a GUI approach...But it cat fall back to select any program you want to open file

  8. fdncred commented on Sep 30, 2022

    @fdncred
    Contributor

    Maybe we should just check if notepad exists on windows and fail with an error message that talks about setting the proper env var. I'm not personally interested in jumping though windows file association hoops in the hope to find something associated with .nu.

    I just wonder if looking up what is associated with .txt is worth the hassle. I may accept a PR to do such a thing though as settings those env vars is not a normal Windows thing.

  9. sholderbach commented on Oct 29, 2022

    @sholderbach
    Member

    Error message fixed by #6730

  10. added this to the v0.70.0 milestone on Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:error-unhelpfulcategory:buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions