-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: support windows and linux from package.json run #3466
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
Open
zendril
wants to merge
8
commits into
sst:opentui
Choose a base branch
from
zendril:fix-hardcoded-run
base: opentui
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+29
−3
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
da07e72
fix: windows not loading due to getContextId non-hydrating error
zendril 64eec4e
fix: putting run back, seems like only the conditions=browser was the…
zendril a26ab7b
fix: made it so that the bin is aware of windows vs linux
zendril d8ffe2d
applying the format.ts changes
zendril 9d158f2
removed the node shebang as this is run by bun
zendril c64c6fc
Merge branch 'opentui' into fix-hardcoded-run
rekram1-node 0d37309
fix: arguments were not being handled properly in opencode.cmd
zendril ae27d6e
Merge branch 'fix-hardcoded-run' of github.com:zendril/opencode into …
zendril File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { spawn } from "child_process" | ||
| import path from "path" | ||
| import { fileURLToPath } from "url" | ||
|
|
||
| const __filename = fileURLToPath(import.meta.url) | ||
| const __dirname = path.dirname(__filename) | ||
|
|
||
| const command = process.platform === "win32" ? "opencode.cmd" : "opencode" | ||
| const commandPath = path.join(__dirname, command) | ||
| const args = process.argv.slice(2) | ||
|
|
||
| const child = spawn(commandPath, args, { | ||
| stdio: "inherit", | ||
| shell: process.platform === "win32", | ||
| }) | ||
|
|
||
| child.on("exit", (code) => { | ||
| process.exit(code === null ? 1 : code) | ||
| }) | ||
|
|
||
| child.on("error", (err) => { | ||
| console.error(`Failed to start subprocess: ${err}`) | ||
| process.exit(1) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { $ } from "bun" | ||
|
|
||
| if (process.versions.bun !== "1.3.0") { | ||
| throw new Error("This script requires [email protected].0") | ||
| if (!process.versions.bun.startsWith("1.3.")) { | ||
| throw new Error("This script requires [email protected]+") | ||
| } | ||
|
|
||
| const CHANNEL = process.env["OPENCODE_CHANNEL"] ?? (await $`git branch --show-current`.text().then((x) => x.trim())) | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.