HomePhabricator
Diffusion Comm 4adea0a1a7c4

Make script shebangs POSIX friendly

Description

Make script shebangs POSIX friendly

Summary:
Sourcing bash from /bin/bash doesn't work on NixOS, and on other platforms it ends up using the system-default bash rather than the one sourced by Nix.

/usr/bin/env is a utility which will find the related command by searching PATH, this allows for nix to introduce other interpreters. It's also considered a "best practice" as some systems such as android, solaris, and other may also not put their default interpreters in /bin

Depends on D3274

Test Plan: This shouldn't invalidate previous behavior of scripts, as most invocations will resolve to /bin/bash

Reviewers: ashoat

Reviewed By: ashoat

Subscribers: varun, ashoat, palys-swm, Adrian, atul, karol-bisztyga, benschac, yayabosh

Differential Revision: https://phabricator.ashoat.com/D3784

Details

Provenance
jonAuthored on Apr 19 2022, 9:54 PM
Reviewer
ashoat
Differential Revision
D3784: Make script shebangs POSIX friendly
Parents
rCOMM5dfdee963432: Add intial nix yarn dev env
Branches
Unknown
Tags
Unknown