-
Notifications
You must be signed in to change notification settings - Fork 371
fix: remove --ignore-scripts for crush install and add crush --version step #29735
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,13 +59,34 @@ func (e *CrushEngine) GetInstallationSteps(workflowData *WorkflowData) []GitHubA | |
| return []GitHubActionStep{} | ||
| } | ||
|
|
||
| npmSteps := BuildStandardNpmEngineInstallSteps( | ||
| // Use version from engine config if provided, otherwise default to pinned version | ||
| version := string(constants.DefaultCrushVersion) | ||
| if workflowData.EngineConfig != nil && workflowData.EngineConfig.Version != "" { | ||
| version = workflowData.EngineConfig.Version | ||
| } | ||
|
|
||
| // Crush requires post-install scripts (native binaries) so --ignore-scripts must | ||
| // NOT be passed. This is intentionally different from other engine installs. | ||
| npmSteps := GenerateNpmInstallSteps( | ||
| "@charmland/crush", | ||
| string(constants.DefaultCrushVersion), | ||
| version, | ||
| "Install Crush CLI", | ||
| "crush", | ||
| workflowData, | ||
| true, // Include Node.js setup | ||
| true, // Crush requires post-install scripts for native binaries | ||
| ) | ||
|
|
||
| // Run crush --version to verify the installation and force any deferred binary downloads | ||
| commandName := "crush" | ||
| if workflowData.EngineConfig != nil && workflowData.EngineConfig.Command != "" { | ||
| commandName = workflowData.EngineConfig.Command | ||
| } | ||
| versionStep := GitHubActionStep{ | ||
| " - name: Verify Crush CLI installation", | ||
| " run: " + commandName + " --version", | ||
|
Comment on lines
+80
to
+86
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ug! Me agree with other caveman reviewer. Dead code bad. Simplify good!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ug! Me see |
||
| } | ||
| npmSteps = append(npmSteps, versionStep) | ||
|
|
||
| return BuildNpmEngineInstallStepsWithAWF(npmSteps, workflowData) | ||
| } | ||
|
|
||
|
|
||
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.
Me like version override! Good cave code. But maybe add log line when version overridden? Help debug later.