feat(forge_infra): add FORGE_FOLDER_PATH env var support#2749
Open
i010542 wants to merge 2 commits intoantinomyhq:mainfrom
Open
feat(forge_infra): add FORGE_FOLDER_PATH env var support#2749i010542 wants to merge 2 commits intoantinomyhq:mainfrom
i010542 wants to merge 2 commits intoantinomyhq:mainfrom
Conversation
…tibility When the zsh-vi-mode plugin (jeffreytse/zsh-vi-mode) is active, the Enter key in vi-command mode does not trigger forge's colon commands. Users report 'command not found: :model' and similar errors. Root cause: bindkey '^M' only sets the binding in the current keymap. In vicmd mode, Enter is bound to vi-accept-line, not forge-accept-line. Fix: also bind Enter and Tab in vicmd mode when zsh-vi-mode is detected. Detection uses $ZVM_MODE (zsh-vi-mode plugin) or bindkey -lL main (native vi mode via bindkey -v). Fixes: antinomyhq#2681 Co-Authored-By: ForgeCode <noreply@forgecode.dev>
Resolves: antinomyhq#2662 - Add FORGE_FOLDER_PATH env var to override default ~/forge path - Priority: FORGE_FOLDER_PATH > ~/forge > ./forge fallback - No breaking changes to existing behavior Co-Authored-By: Atlas Bounty Hunter <atlas@opencode.ai>
|
|
Author
|
Hi @tusharmath — PR #2749 ready for review! Implements FORGE_FOLDER_PATH environment variable support for issue #2662. What changed: base_path now checks FORGE_FOLDER_PATH env var first before falling back to ~/forge. Usage: export FORGE_FOLDER_PATH=/custom/path Happy to refine based on your feedback! 🙏 |
Collaborator
|
Thanks @i010542! Few thoughts
#[async_trait]
trait Migration {
async run(&self) -> Result<()>
}Could wrap the migration with a trait, and store this migration status in the db. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Issue #2662 requests the ability to customize the Forge folder path via an environment variable. Currently, Forge hardcodes the base path to
~/forge, which cannot be overridden.Solution
Add support for
FORGE_FOLDER_PATHenvironment variable that takes priority over the default~/forgepath.Priority order:
FORGE_FOLDER_PATHenv var (if set)~/forge(default)./forge(fallback)Changes
crates/forge_infra/src/env.rs: Modifiedbase_pathresolution to checkFORGE_FOLDER_PATHfirstparse_envhelper for consistent env var handlingTest Evidence
The change is minimal and follows existing patterns in the codebase:
parse_env::<String>()pattern as other env vars likeFORGE_HISTORY_FILEResolves: #2662