Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of backticks in description breaks build #28

Open
srid opened this issue Mar 30, 2023 · 1 comment
Open

Use of backticks in description breaks build #28

srid opened this issue Mar 30, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@srid
Copy link
Member

srid commented Mar 30, 2023

When description contains backticks:

{
  description = "Foo `bar` qux";
}

we see:

error: builder for '/nix/store/bhr9lfplzh0352yh4n6gnxdbjqbba7wh--.drv' failed with exit code 1;
       last 7 log lines:
       >
       > In /nix/store/lcd5hrlm9vl4l8j15kqazr5xqm0di25p--/bin/, line 10:
       >   echo -e '## Backend';echo;echo '  , backend-ghcid : Compile the given local package using ghcid.
       >                                  ^-- SC2016 (info): Expressions don't expand in single quotes, use double quotes for that.
       >
       > For more information:
       >   https://www.shellcheck.net/wiki/SC2016 -- Expressions don't expand in singl...
       For full logs, run 'nix log /nix/store/bhr9lfplzh0352yh4n6gnxdbjqbba7wh--.drv'.
error: 1 dependencies of derivation '/nix/store/0rj05a1mlisffwyn649j17sri7bhnz3r-ghc-shell-for-packages-0-env.drv' failed to build
@srid srid added the bug Something isn't working label Mar 30, 2023
@stites
Copy link

stites commented Apr 27, 2023

Another related issue is that using single-quotes will also break the build:
description = "refresh machine's cargo-cabal from Cargo.toml";

Produces a , script of:

showHelp () {
  echo -e "Available commands:\n"
  echo -e '## Dev Tools';echo;echo '  , cargo-cabal	: cargo-cabal
  , dev	: Start watchexec
  , docs	: Start Hoogle server for project dependencies
  , fmt	: Format the source tree
  , refresh-machines	: refresh machine's cargo-cabal from Cargo.toml
  , repl	: Start the cabal repl' | /nix/store/5yc1cplwszlddqj17989jshws1j14dl1-column-util-linux-2.38.1/bin/column -t -s ''$'	';
}

which includes the un-escaped '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants