Details
Details
- Reviewers
tomek ashoat - Commits
- rCOMM0b066805d2c3: [services] Change sourcing bash in scripts
cd services yarn test-backup-service-dev-mode yarn test-blob-service-dev-mode cd .. git grep "#\!/bin/bash" # should be empty
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I also spotted a couple of places beyond services where this occurs:
native/android/app/bash/build_openssl.sh:#!/bin/bash native/android/app/bash/detect_abis.sh:#!/bin/bash native/scripts/mark-generated.sh:#!/bin/bash
Should we change this as well or is this just for services? @jonringer-comm @ashoat
Comment Actions
Yeah I think this is probably always a good idea, since it makes it possible to run these scripts from within Nix. Nix creates it's own path /nix in your system with all of its binaries, and sources its bash into $PATH... so we can use the Nix bash by accessing #!/usr/bin/env bash (which checks $PATH for bash), but if we use #!/bin/bash we are using the older system-default bash on MacOS.
I think the original reason for @jonringer-comm's diff was that NixOS (Linux distro based on Nix) doesn't even have /bin/bash, so the scripts would fail to run there.