-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[email protected]: fix clink script path #7171
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
base: master
Are you sure you want to change the base?
Conversation
The path installed via clink installscripts was different for each version of clink-flex-prompt, creating issues as the same script was loaded multiple times (with different version). This change makes the path consistent across versions, making sure only the latest one is loaded. Closes ScoopInstaller#7170
WalkthroughIntroduces a new PowerShell variable $luapath pointing to the canonical "current" directory and replaces uses of $dir with $luapath in clink installscripts/uninstallscripts calls within both installer and uninstaller blocks of bucket/clink-flex-prompt.json. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Scoop as Scoop Installer
participant PS as PowerShell Script
participant Clink as clink.exe
rect rgba(220,235,245,0.5)
note over PS: Install
User->>Scoop: scoop install clink-flex-prompt
Scoop->>PS: Run install block
PS->>PS: $luapath = Join-Path (Split-Path $dir -Parent) "current"
PS->>Clink: clink installscripts "$luapath"
Clink-->>PS: Register scripts (canonical path)
end
rect rgba(235,220,245,0.5)
note over PS: Uninstall
User->>Scoop: scoop uninstall clink-flex-prompt
Scoop->>PS: Run uninstall block
PS->>PS: $luapath = Join-Path (Split-Path $dir -Parent) "current"
PS->>Clink: clink uninstallscripts "$luapath"
Clink-->>PS: Deregister scripts
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All changes look good. Wait for review from human collaborators. clink-flex-prompt
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
For information, it's the same fix that was applied to clink-completions some month ago. |
Hi I plan to review this PR. if possible could you add the link to that PR/issue/commit for reference? That would be easier for me. |
The path installed via clink installscripts was different for each
version of clink-flex-prompt, creating issues as the same script was
loaded multiple times (with different version).
This change makes the path consistent across versions, making sure only
the latest one is loaded.
Closes #7170
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit