Skip to content

[Bug]: shared.sh Uses Bash-Specific Syntax #224

@AMythicDev

Description

@AMythicDev

Version

Version 0.10.4.1 (Official Build, Chromium 146.0.7680.75) Arch Linux (64-bit)

Have you tested that this is not an upstream issue or an issue with your configuration?

  • I have tried reproducing this issue in Chrome and it could not be reproduced there
  • I have tried reproducing this issue in ungoogled-chromium and it could not be reproduced there
  • I have tried reproducing this issue in Helium with a new and empty profile using --user-data-dir command line argument and it could not be reproduced there

Description

The setup_toolchain() function in scripts/shared.sh uses the export CXXFLAGS+="..." syntax which is specific to bash shell and fails when it is used under another shell like zsh. The failure occurs because when sourcing dev.sh it in turn sources shared.sh where the incompatible syntax gets loaded into the active shell.

How to Reproduce?

  1. Open a zsh shell.
  2. (Optionally) Activate your Python environment.
  3. Run source dev.sh.
  4. Run he setup.

Actual behavior

The script fails with

setup_toolchain:export  not valid in this context: CXXFLAGS+

Expected behavior

The script should setup the helium development environment successfully.

Additional context

  • Although the shared.sh script has a bash shebang, however it has no effect because it is sourced by dev.sh which itself is sourced in the current user shell.
  • We should support Zsh considering a lot of devs prefer it over bash (Not relevant here but MacOS also defaults to Zsh)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions