Platonic-Systems / mission-control

A `flake-parts` module for your Nix devshell scripts
https://community.flake.parts/mission-control
MIT License
79 stars 11 forks source link

Use of backticks in `description` breaks build #28

Open srid opened 1 year ago

srid commented 1 year ago

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
stites commented 1 year ago

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 '