Skip to content

Swiftly installation instructions are inaccurate for shells like fish #963

Open
@MahdiBM

Description

@MahdiBM

Describe the bug

https://www.swift.org/install/macos/
instructs to use this command to install swiftly:

curl -O https://download.swift.org/swiftly/darwin/swiftly.pkg && \
installer -pkg swiftly.pkg -target CurrentUserHomeDirectory && \
~/.swiftly/bin/swiftly init --quiet-shell-followup && \
. ~/.swiftly/env.sh && \
hash -r

However, for the fish shell the second-to-last line should be . ~/.swiftly/env.fish && \

The current instructions results in this error:

Once swiftly is installed it will install the latest available swift toolchain.

Proceed? (Y/n):
y
Creating shell environment file for the user...
Updating profile...
Fetching the latest stable Swift release...
Installing Swift 6.1.0
                                                   Downloading Swift 6.1.0
100% [========================================================================================================================]
Downloaded 1462.2 MiB of 1462.2 MiB

Installing package in user home directory...
The global default toolchain has been set to `Swift 6.1.0`
Swift 6.1.0 installed successfully!
.: Error encountered while sourcing file '/Users/my-user/.swiftly/env.sh':
.: No such file or directory

You can still manually run source /Users/my-user/.swiftly/env.fish.

To Reproduce

Steps to reproduce the behavior:

Use fish shell and follow the installation instructions.

Expected behavior

Smooth installation for users of other shells.

Actual behavior

Errors as described.

Screenshots

Environment details

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

If possible, minimal yet complete reproducer code (or link to code)

Swift.org version/commit hash

Additional context

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