Skip to content

When pub creates executable script, it doesn't work on Linux Mint / Ubuntu due to use of sh #1274

Closed
@DartBot

Description

@DartBot

Originally opened as dart-lang/sdk#22973

This issue was originally filed by [email protected]


For example, the following script generated for csp_fixer fails to run on linux mint, as 'sh' is really dash, and a really restricted shell

!/usr/bin/env sh

This file was created by pub v1.8.5.

Package: csp_fixer

Version: 0.1.3

Executable: csp_fixer

Script: csp_fixer

dart "/home/daniel/.pub-cache/global_packages/csp_fixer/bin/csp_fixer.dart.snapshot" "$@"

csp_fixer some/path

fails with "dart not found"

but bash has PATH properly set up, and dart can be run from the shell prompt

PATH is not being forwarded to sh, or sh on Mint ( which is supplied by dash ) doesn't properly support it.

Some method should be provided to change the shell used, or perhaps a more universal option found.

cf bug dart-archive/pub-dartlang#271

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed-as-intendedClosed as the reported issue is expected behaviortype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions