Skip to content

Commit cd6e287

Browse files
committed
fix: try direct xlings install on Windows instead of NDJSON interface
1 parent 51b8b8f commit cd6e287

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/xlings.cppm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,14 @@ int install_with_progress(const Env& env, std::string_view target,
663663
_putenv_s("XLINGS_PROJECT_DIR", "");
664664
std::error_code ec_mkdir;
665665
std::filesystem::create_directories(env.home, ec_mkdir);
666+
// Use direct `install` command instead of `interface install_packages`
667+
// on Windows. The NDJSON interface may have issues with large packages
668+
// where the extraction subprocess doesn't respect XLINGS_HOME.
669+
auto directCmd = std::format("{} install {} -y",
670+
env.binary.string(), target);
671+
int directRc = std::system(directCmd.c_str());
672+
if (directRc == 0) return 0;
673+
// Fallback to interface path if direct install fails
666674
auto cmd = std::format("{} interface install_packages --args {}",
667675
env.binary.string(),
668676
shq(argsJson));

0 commit comments

Comments
 (0)