View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002653 | Buildsystem | [All Projects] General | public | 2019-05-18 18:27 | 2019-08-01 11:07 | ||||
Reporter | Michael Siegel | ||||||||
Assigned To | |||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Platform | Linux | OS | Devuan | OS Version | 2.0.0/ASCII | ||||
Summary | 0002653: env.sh: Function names including hyphens cause syntax error in dash | ||||||||
Description | As the shebang (#!/bin/sh) implies, the env.sh script is supposed to work in POSIX shells – or at least in dash, as I've been told on IRC. However, POSIX doesn't allow for function names to contain hyphens, and neither does dash, at least not up until version 0.5.8, which is the one in Debian's current stable release. So, these functions should better be named using underscores instead of hyphens. | ||||||||
Steps To Reproduce | $ dash $ ns-apt-get-install() { echo "would do stuff"; } dash: 1: Syntax error: Bad function name $ ns_apt_get_install() { echo "would do stuff"; } $ ns_apt_get_install would do stuff $ | ||||||||
Tags | No tags attached. | ||||||||
Fixed in CI build # | |||||||||
Reported in CI build # | |||||||||
Attached Files |
|
Notes | |
Daniel Silverstone (administrator) 2019-08-01 11:07 |
This is a fragment intended to be sourced into an interactive `bash` or `zsh` not `dash`. As such I've removed the shebang and added a comment to that effect. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2019-05-18 18:27 | Michael Siegel | New Issue | |
2019-08-01 11:07 | Daniel Silverstone | Status | new => closed |
2019-08-01 11:07 | Daniel Silverstone | Resolution | open => no change required |
2019-08-01 11:07 | Daniel Silverstone | Note Added: 0002041 |