Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pwd -P produces incorrect output #553

Closed
amancevice opened this issue Aug 17, 2021 · 2 comments · Fixed by #580
Closed

pwd -P produces incorrect output #553

amancevice opened this issue Aug 17, 2021 · 2 comments · Fixed by #580
Labels
dep: mvdan/sh Issues related to the upstream interpreter used by Task.

Comments

@amancevice
Copy link
Contributor

  • Task version: Task version: v3.7.0 (h1:8dDFv12/Lxi6PHkYNIIm7N6v6oRGxePpLK67LuMh/Rs=)
  • Operating System: macOS 11.5.1 (Big Sur)

Example Taskfile showing the issue

Reproduce with the following steps:

mkdir ~/tmpdir
ln -s ~/tmpdir ~/tmplink
cd ~/tmplink
pwd -P
# => /Users/<user>/tmpdir

Using the following Taskfile:

version: "3"
tasks:
  default:
    cmds:
      - pwd -P

Output is:

task: [default] pwd -P
/Users/<user>/tmplink
@amancevice amancevice added the type: bug Something not working as intended. label Aug 17, 2021
@amancevice amancevice changed the title pwd -P produced incorrect output pwd -P produces incorrect output Aug 17, 2021
@amancevice
Copy link
Contributor Author

Interestingly, changing the command to sh -c 'pwd -P' seems to work as expected!

@andreynering
Copy link
Member

Hi @amancevice,

This seems like a bug on the shell interpreter library Task uses: https://github.com/mvdan/sh

sh -c 'pwd -P' works because sh -c bypasses the library and runs the command in the system's shell.

Would you mind opening an issue there explaining the problem?

@andreynering andreynering added the dep: mvdan/sh Issues related to the upstream interpreter used by Task. label Sep 6, 2021
@andreynering andreynering linked a pull request Oct 2, 2021 that will close this issue
@pd93 pd93 removed the type: bug Something not working as intended. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dep: mvdan/sh Issues related to the upstream interpreter used by Task.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants