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

Fixes #303 #308

Merged
merged 4 commits into from
Feb 5, 2024
Merged

Fixes #303 #308

merged 4 commits into from
Feb 5, 2024

Conversation

mxcl
Copy link
Member

@mxcl mxcl commented Feb 5, 2024

No description provided.

@mxcl
Copy link
Member Author

mxcl commented Feb 5, 2024

don't get it

error: Uncaught (in promise) AlreadyExists: File exists (os error 17): symlink '/home/runner/.pkgx/llvm.org/v*/bin/clang' -> '/home/runner/work/brewkit/brewkit/homes/stark.com__foo-1.13.0/toolchain/cc'
    Deno.symlinkSync(target.string, this.string)

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

add .rm() to const d = config.path.home.join('toolchain').mkdir('p') probably.

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

or you can make Path.ln() do .rm() automatically, but that feels a little too magical.

@mxcl
Copy link
Member Author

mxcl commented Feb 5, 2024

Path.ts has the attitude of “if the thing you want to do is already done it’s a noop” so it fits. But not willing to bump libpkgx to fix the issue here.

Monorepos have advantages.

@jhheider
Copy link
Contributor

jhheider commented Feb 5, 2024

i think that's probably often true in path management. but, and maybe you feel differently, i expect cp/mv/ln to overwrite by default (and get irrationally upset when ln doesn't and complains). so, something to consider in the interface design.

if Deno.symlinkSync() had a force option, that'd be the obvious bit to expose. we could add a force option to ln(), but that'd just be chaining in a .rm().

@mxcl mxcl merged commit 09713c5 into main Feb 5, 2024
33 checks passed
@mxcl mxcl deleted the fix/303 branch February 5, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants