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

Ignoring taskfile: "..." (outside of workspace) #121

Open
saperant opened this issue Dec 7, 2023 · 3 comments
Open

Ignoring taskfile: "..." (outside of workspace) #121

saperant opened this issue Dec 7, 2023 · 3 comments
Labels
area: input Changes related to the reading of Taskfiles. type: bug Something not working as intended.

Comments

@saperant
Copy link

saperant commented Dec 7, 2023

It seems that the following check causes problems, when VS Code project is opened behind a symlinked folder:
https://github.com/go-task/vscode-task/blob/8f857660326255281fcdbf6bb4c24850970612f3/src/services/taskfile.ts#L206C25-L206C25

Had this error message:

Updating settings
Extension activated
Calling GitHub to get the latest version
Searching for taskfile in: "/home/saku/src/myproject"
Ignoring taskfile: "/home/saku/src/myproject/Taskfile.yml" (outside of workspace)

And everything is working fine when there is no symlink in the project path (my ~/src is a symlink).

@nights99
Copy link

I'm also hitting this; it might be sufficient to call fs.realpathSync() on the workspace dir? I'm a long way from an expert in this area, but I've tried that and it seems to work for my case at least.

@danielloader
Copy link

I have this issue but no symlinks involved, just trying to open both the local repo specific Taskfile.yml and my global user Taskfile.yml in the $HOME.

I imagine the extension just can't access files outside of the workspace directory for sandbox/security reasons. This might have been a recent change to vscode if this used to work.

@pd93 pd93 added type: bug Something not working as intended. area: input Changes related to the reading of Taskfiles. labels Apr 5, 2024
@bdmorin
Copy link

bdmorin commented May 30, 2024

I just started using task, and cannot get the extension to use Taskfile.yml in my vscode. I keep getting the same message @saperant does, but I have no symlinks.

Detected changes to taskfile
Searching for taskfile in: "/Users/bdmorin/src/deploy"
Ignoring taskfile: "/Users/bdmorin/src/deploy/Taskfile.yml" (outside of workspace)

The directory is in my trusted zones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: input Changes related to the reading of Taskfiles. type: bug Something not working as intended.
Projects
None yet
Development

No branches or pull requests

5 participants