fix(studio): chain config dir + spawn path + doc URLs
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Track the platform rename: the hub spawn path is now ~/.chain/bin/chain (was ~/.fai/bin/fai.exe on Windows — both dir and binary were stale, so Studio could not launch the hub after the config-dir rename), the ~/.fai/* help strings become ~/.chain/*, FAI_REGISTRY_TOKEN -> CHAIN_REGISTRY_TOKEN, and the two in-app doc URLs point at the public fai/chain repo (fai/platform was renamed to the private fai/chain-private). The .fai module bundle extension is left unchanged (format phase). flutter analyze: no issues. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
7ff4fda2a3
commit
0f93d90963
18 changed files with 121 additions and 121 deletions
|
|
@ -11,7 +11,7 @@
|
|||
// call for processes.
|
||||
//
|
||||
// The `fai` binary is resolved from PATH first; falls back to
|
||||
// `~/.fai/bin/chain` (Unix) or `%USERPROFILE%\.fai\bin\chain.exe`
|
||||
// `~/.chain/bin/chain` (Unix) or `%USERPROFILE%\.chain\bin\chain.exe`
|
||||
// (Windows). The PowerShell installer puts both in PATH but
|
||||
// some operators don't restart their shell after install — the
|
||||
// fallback covers that case.
|
||||
|
|
@ -30,7 +30,7 @@ const String kFaiBinaryNotFound = 'fai-binary-not-found';
|
|||
/// in the OS browser as the fallback affordance when no `fai`
|
||||
/// binary can be located on the machine.
|
||||
const String kFaiInstallDocsUrl =
|
||||
'https://git.flemming.ai/fai/platform#installation';
|
||||
'https://git.flemming.ai/fai/chain#installation';
|
||||
|
||||
class SystemActions {
|
||||
SystemActions._();
|
||||
|
|
@ -151,7 +151,7 @@ class SystemActions {
|
|||
return _runFai(['update', 'apply', '--channel', channel]);
|
||||
}
|
||||
|
||||
/// Switch the active channel pointer at `~/.fai/current-channel`.
|
||||
/// Switch the active channel pointer at `~/.chain/current-channel`.
|
||||
/// The CLI also restarts the daemon for the new channel, so the
|
||||
/// caller does not need a follow-up restart.
|
||||
static Future<({bool ok, String stdout, String stderr})> faiChannelSwitch(
|
||||
|
|
@ -179,7 +179,7 @@ class SystemActions {
|
|||
|
||||
/// Run `chain reset --yes`. Wipes operator state with the same
|
||||
/// safety net as the CLI: stops every daemon (including off-
|
||||
/// channel orphans), atomically backs `~/.fai/` up, recreates
|
||||
/// channel orphans), atomically backs `~/.chain/` up, recreates
|
||||
/// it with `bin/`, `channels/`, `config.yaml`, `current-channel`,
|
||||
/// and `registry-token` preserved. The daemon restarts on the
|
||||
/// active channel before the call returns.
|
||||
|
|
@ -248,8 +248,8 @@ class SystemActions {
|
|||
final home = Platform.environment[isWindows ? 'USERPROFILE' : 'HOME'];
|
||||
if (home == null || home.isEmpty) return null;
|
||||
final fallback = isWindows
|
||||
? '$home\\.fai\\bin\\fai.exe'
|
||||
: '$home/.fai/bin/chain';
|
||||
? '$home\\.chain\\bin\\chain.exe'
|
||||
: '$home/.chain/bin/chain';
|
||||
return File(fallback).existsSync() ? fallback : null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue