Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/hearthspace. A spatial Linux desktop for persistent, local-first computing.
Something went wrong. Try again.
912 B · 30 lines
12345678910111213141516171819202122232425262728293031#!/usr/bin/env python3"""Build a development app, then execute Cargo's exact artifact with literal argv."""
import osimport subprocessimport sysfrom pathlib import Path
from runtime_artifacts import build_executable
def main(): if len(sys.argv) < 2: raise ValueError("usage: dev-run-app <app-binary> [arguments...]") repository = Path( os.environ.get("HEARTHSPACE_REPO_ROOT", Path(__file__).resolve().parents[1]) ).resolve() executable = build_executable(sys.argv[1], repository) os.chdir(repository) os.execv(executable, [str(executable), *sys.argv[2:]])
if __name__ == "__main__": try: main() except subprocess.CalledProcessError as error: raise SystemExit(error.returncode) from None except (OSError, ValueError, RuntimeError) as error: print(f"dev-run-app: {error}", file=sys.stderr) raise SystemExit(1) from None