Skip to content

servejss: --git flag not passed through to JSS #2

Description

@melvincarvalho

Summary

servejss does not pass --git to the underlying JSS server, so git HTTP backend support is never enabled. Running git push against a servejss instance fails with fatal: repository not found.

Details

JSS has built-in git HTTP backend support (git clone, git push over HTTP) enabled via --git. However, jsserve/bin/jsserve.js:

  1. Does not expose a --git / --no-git CLI option
  2. Does not include --git in the jssArgs array passed to JSS

Since JSS defaults to git: false (options.git ?? false in server.js), git support is always off when using servejss.

Expected behavior

servejss should enable --git by default and expose --git / --no-git CLI flags so users can control it.

Steps to reproduce

npx servejss@latest --port 4445
# In another terminal:
git remote add x http://localhost:4445/myrepo/
git push x main
# fatal: repository 'http://localhost:4445/myrepo/' not found

Proposed fix

In bin/jsserve.js:

  • Add CLI option: .option('--git', 'Enable git HTTP backend (default: true)') and .option('--no-git', 'Disable git HTTP backend')
  • Pass to JSS args: if (options.git !== false) { jssArgs.push('--git'); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions