mosaic fleet logins: per-seat credential pass-through (P4 gap closure) (#1473)
ci/woodpecker/push/publish Pipeline was canceled
ci/woodpecker/push/publish Pipeline was canceled
Co-authored-by: marcie <[email protected]>
This commit was merged in pull request #1473.
This commit is contained in:
@@ -106,6 +106,7 @@ describe('registerFleetCommand', () => {
|
||||
'init',
|
||||
'install',
|
||||
'install-systemd',
|
||||
'logins',
|
||||
'migrate-v1',
|
||||
'persona',
|
||||
'plan',
|
||||
|
||||
@@ -17,7 +17,7 @@ import { homedir, hostname, userInfo } from 'node:os';
|
||||
import { dirname, join, resolve } from 'node:path';
|
||||
import { fleetAgentEnvDir } from '../fleet/brain-home.js';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { spawn } from 'node:child_process';
|
||||
import { spawn, spawnSync } from 'node:child_process';
|
||||
import * as readline from 'node:readline';
|
||||
import type { Command } from 'commander';
|
||||
import YAML from 'yaml';
|
||||
@@ -1606,6 +1606,24 @@ export function registerFleetCommand(program: Command, deps: FleetCommandDeps =
|
||||
.option('--mosaic-home <path>', 'Mosaic home directory', paths.mosaicHome)
|
||||
.option('--roster <path>', 'Fleet roster path');
|
||||
|
||||
// fleet logins (P4 gap closure, 2026-08-29): project per-seat git tokens
|
||||
// from the brain into usable credentials. The implementation is the
|
||||
// framework fleet tool; args pass through verbatim (--apply --seat X).
|
||||
cmd
|
||||
.command('logins')
|
||||
.description('Per-seat git credentials: seat-logins.sh pass-through (--apply --seat <name>)')
|
||||
.allowUnknownOption(true)
|
||||
.allowExcessArguments(true)
|
||||
.action((...rest: unknown[]) => {
|
||||
const cmdObj = rest[rest.length - 1] as { args: string[] };
|
||||
const script = `${frameworkRoot}/tools/fleet/seat-logins.sh`;
|
||||
const result = spawnSync('bash', [script, ...cmdObj.args], {
|
||||
stdio: 'inherit',
|
||||
env: process.env,
|
||||
});
|
||||
process.exit(result.status ?? 125);
|
||||
});
|
||||
|
||||
cmd
|
||||
.command('init')
|
||||
.description('Initialize a local fleet roster')
|
||||
|
||||
Reference in New Issue
Block a user