olive-editor: Add version 0.2.0-nightly#2564
olive-editor: Add version 0.2.0-nightly#2564o-l-a-v wants to merge 1 commit intoScoopInstaller:masterfrom
Conversation
WalkthroughA new manifest file for Olive Editor is introduced to the bucket directory. The manifest defines a Windows 64-bit portable build configuration, including version detection from GitHub releases, auto-update logic, binary specification, shortcut mapping, persistent config file handling, and pre-install/post-install cleanup steps. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
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. olive-editor
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
bucket/olive-editor.json(1 hunks)
🔇 Additional comments (2)
bucket/olive-editor.json (2)
34-41: Checkver logic verified—code correctly targets prerelease versions, aligning with manifest.The GitHub API confirms
prerelease,tag_name, andassetsfields exist. The filter.Where{$_.'prerelease'}[0]correctly selects prerelease releases (prerelease=true), which matches the manifest version 0.2.0-nightly. Property accessor syntax works correctly with the API response, and the Windows portable asset name pattern matches existing releases. No action needed.
1-49: Verify the SHA256 checksum by downloading the file or checking with the upstream project.URL accessibility confirmed ✓—the file exists at the GitHub release and the manifest URL matches exactly. The autoupdate template is correct and will reconstruct valid URLs using captured tag and filename. The manifest is complete with all required and recommended fields, and handles config creation, persistence, and updates properly.
However, the SHA256 checksum (
b0ed9c8291093c29b01090ec49198af001c9d881c35f49ccf0f5030df994c4a5) cannot be verified programmatically since GitHub's release API does not include asset hashes. Manually verify this hash matches the actual file or contact the Olive Editor project to confirm.
| " $null = Out-File -Append -FilePath $ConfigFile -Encoding 'UTF8' -InputObject $_", | ||
| " }", | ||
| "}", | ||
| "$null = Remove-Item -Path \"$dir\\vc_redist.x64.exe\"" |
There was a problem hiding this comment.
Path escaping issue and missing error handling in pre_install.
The Remove-Item command uses a double backslash in the path string ("$dir\\vc_redist.x64.exe"), which is incorrect. Additionally, if the file doesn't exist, the command will fail and block installation.
Apply this diff to fix both issues:
- "$null = Remove-Item -Path \"$dir\\vc_redist.x64.exe\""
+ "$null = Remove-Item -Path \"$dir\vc_redist.x64.exe\" -ErrorAction SilentlyContinue"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "$null = Remove-Item -Path \"$dir\\vc_redist.x64.exe\"" | |
| "$null = Remove-Item -Path \"$dir\\vc_redist.x64.exe\" -ErrorAction SilentlyContinue" |
🤖 Prompt for AI Agents
In bucket/olive-editor.json around line 24, the Remove-Item call uses an
incorrect escaped path string and lacks error handling; change it to build the
path safely (use Join-Path or concatenate with a single backslash) and avoid
failing when the file is absent by either checking Test-Path before removal or
passing -ErrorAction SilentlyContinue to Remove-Item so the pre_install step
does not block if the file doesn't exist.
There was a problem hiding this comment.
Nah, it's correct. Backslash is the path separator on Windows. It must be escaped inside JSON with a backslash.
There was a problem hiding this comment.
@o-l-a-v, you're absolutely right, and I apologize for the confusion!
You are correct that in JSON, the backslash must be escaped, so \\ in the JSON string becomes a single \ after parsing. The PowerShell code will receive "$dir\vc_redist.x64.exe" which is the correct path format for Windows.
My original comment was incorrect about the path escaping. The -ErrorAction SilentlyContinue suggestion could still help if the file might be absent in some versions, but if you're confident the file always exists in this portable distribution, the current code is fine.
Thank you for the correction!
✏️ Learnings added
Learnt from: o-l-a-v
Repo: ScoopInstaller/Versions PR: 2564
File: bucket/olive-editor.json:24-24
Timestamp: 2025-11-07T10:15:21.019Z
Learning: In Scoop manifest JSON files, PowerShell commands in arrays like `pre_install` require backslashes to be escaped as `\\` in the JSON. After JSON parsing, `"$dir\\file.exe"` correctly becomes `$dir\file.exe` in PowerShell. This is proper JSON escaping, not an error.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
Relates to:
Changes to manifest vs. what's in Extras:
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit