Skip to content

Fix undefined say() in dnvm install script#325

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-dnvm-install-script
Draft

Fix undefined say() in dnvm install script#325
Copilot wants to merge 2 commits intomainfrom
copilot/fix-dnvm-install-script

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

The install script (https://dnvm.net/install.sh) crashes in non-interactive environments with sh: say: command not found because err() calls say(), which was never defined.

Changes

  • src/install/install.sh.template — Added to this repo as the authoritative source. Defines the missing say() helper before err():

    # Print a message to stdout.
    say() {
        printf '%s\n' "$1"
    }
    
    err() {
        say "$1" >&2
        exit 1
    }
  • .github/workflows/webUpdate.yml — Extended to checkout this repo and sync install.sh.template to dn-vm.github.io via the GitHub Contents API before triggering the site rebuild, making dn-vm/dnvm the single source of truth for the install script.

Original prompt

This section details on the original issue you should resolve

<issue_title>dnvm install script fails in non-interactive Linux environments because say is undefined</issue_title>
<issue_description>
I hit a bug in the installer script at:

curl --proto '=https' -sSf https://dnvm.net/install.sh | sh

on this system:

  • OS: Fedora Asahi Remix 43
  • Arch: aarch64 / arm64
  • Shell: /bin/bash
  • Invocation context: non-interactive shell / piped into sh

Observed behavior

The installer starts, then fails with:

info: downloading installer
Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure
Warning: Not enforcing TLS v1.2, this is potentially less secure
sh: line 227: say: command not found

Root cause

The script defines:

err() {
say "$1" >&2
exit 1
}

but say is never defined anywhere in the script.

On Linux, say is not a standard command, so any path that calls err() crashes with say: command not found instead of printing the intended error.

Why this may not reproduce in a normal interactive terminal

This seems to show up when the script hits an error path, especially in non-interactive contexts.

In my case, after patching in a local say() shim, the script’s intended error was:

Unable to run interactively. Run with -y to accept defaults, --help for additional options

So interactive runs may appear fine because they never hit err().

Minimal fix

Define say() in the script, or replace say with printf / echo.

For example:

say() {
printf '%s\n' "$1"
}

or just change err() to:

err() {
printf '%s\n' "$1" >&2
exit 1
}

Additional note

After working around the say issue and running with -y, the script successfully installed dnvm itself, but defaulted to installing .NET 10 on this machine. When I later tried installing the .NET 11 preview via dnvm, extraction failed with:

Error: Extract failed: Could not find file '/tmp/.../sdk/11.0.100-preview.2.../FSharp/Microsoft.NET.StringTools.dll'

Note: I asked openclaw to install dnvm/dotnet. I then asked it to write this report on what happened.</issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

… and sync via webUpdate.yml

Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix undefined 'say' in dnvm install script Fix undefined say() in dnvm install script Mar 13, 2026
Copilot AI requested a review from agocke March 13, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dnvm install script fails in non-interactive Linux environments because say is undefined

2 participants