pch / welder

👨‍🏭Set up your Linux server with plain shell scripts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welder doesn't respect hash bang line

haarts opened this issue · comments

I have a setup script which defines set -xeu. That script is to be run on a remote on which Fish is the default shell (it has bash). I get:

set: Variable can't be both exported and unexported
Standard input: set -xue # 'u' will give you warnings on unbound config variables
                ^

       set -- display and change shell variables.

   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...

set: Type “help set” for related documentation

This is clearly Fish's set and not Bash's set being used. My setup.sh defines a hash bang like so on the first line #!/bin/bash.

I'm using an (empty) sudo password.

Welder is a simple tool, not meant to cover all use cases. It was written with bash in mind, because it's the default on most servers and that's what I personally use. There's no plans to add support for fish, so the only "solution" I can suggest is to change the default shell on the server.