playwright/utils
Patrick Shaw 6e78dcb7dc
fix: Allow portable bash paths for systems including NixOS (#23889)
Although very common, bash is not guaranteed to be located at
`/bin/bash`. NixOS is an example of this.

More commonly, `/bin/bash` can be quite out of date. An example of this
is MacOS's version of `bash`. This realistically won't affect Playwright
but it's worth noting. You can technically update MacOS's system version
of bash but you need elevated permissions to do so.

By using `/usr/bin/env bash` instead of `/bin/bash` we can execute
Playwright's bash scripts in like NixOS and generally improve the
selection behaviour for bash in other systems too.

Some discussion of why it's worth favouring `/usr/bin/env bash` over
`/bin/bash`:
- Discusses `/bin/bash` missing in NixOS:
https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/5673
- Some general commentary on why `/usr/bin/env bash` is favoured:
https://askubuntu.com/a/1402721
- Points out how old bash is in MacOS:
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba

Improves situation at #5501
2023-07-03 06:27:06 -07:00
..
build fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
docker fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
doclint chore: generate docs versions in pw.dev (#23412) 2023-06-01 01:14:00 +02:00
flakiness-dashboard chore(deps): bump xml2js from 0.4.23 to 0.5.0 in /utils/flakiness-dashboard (#22346) 2023-04-12 09:55:17 +02:00
generate_types docs: code snippet alignments (#23959) 2023-06-29 18:26:19 +02:00
linux-browser-dependencies fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
protocol-types-generator fix: protocol generation in monorepo (#9513) 2021-10-14 11:14:50 -07:00
avd_install.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
avd_recreate.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
avd_start.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
avd_stop.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
build_android_driver.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
check_chromium_cdn.js chore: fixes to helper scripts 2021-11-17 17:02:29 -08:00
check_deps.js chore: fix a lint on win (#23554) 2023-06-06 14:50:44 -07:00
copyright.js chore(eslint): lint for copyrights on files (#2858) 2020-07-07 11:12:45 -07:00
draft_release_notes.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
generate_channels.js chore: explicitly control actions with slow mo (#22445) 2023-04-17 16:19:30 -07:00
generate_chromium_default_font_families.js fix(chromium): work around about:blank issue on Chromium (#14068) 2022-05-10 20:32:19 +01:00
generate_dotnet_channels.js fix(dotnet): generate bool? correctly in generated transport channel types (#23966) 2023-06-29 22:16:16 +02:00
generate_injected.js chore: do not use module.exports in the injected esm files (#21412) 2023-03-05 20:01:35 -08:00
generate_third_party_notice.js chore: bundle chokidar, leave fsevents as an optional dependency (#20762) 2023-02-09 08:40:27 -08:00
limits.sh chore: unflake ui tests (3) (#22741) 2023-05-01 15:18:34 -07:00
lint_tests.js chore: add npm run lint-tests (#10252) 2021-11-11 13:27:50 -08:00
list_closed_issues.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
markdown.js docs: add titles to config snippets (#22910) 2023-05-10 18:38:12 +02:00
pack_package.js chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
print_versions.js chore: fix //utils/print_versions.js (#9647) 2021-10-20 02:20:46 -07:00
publish_all_packages.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
roll_browser.js chore: support browser aliases in roll_browser.js (#22389) 2023-04-13 13:57:47 -07:00
ts_to_java.js chore: add ts_to_java test conversion script (#17914) 2022-10-07 13:16:46 -07:00
upload_flakiness_dashboard.sh fix: Allow portable bash paths for systems including NixOS (#23889) 2023-07-03 06:27:06 -07:00
video_stress.js fix(video): reduce buffering in ffmpeg, avoid overbooking cpu (#8786) 2021-09-09 12:41:06 -07:00
workspace.js chore: introduce ct-core to hard-depend on vite (#22437) 2023-04-17 16:19:21 -07:00