updateSpec method

void updateSpec(
  1. CubeSpec spec
)

Swaps the enforced spec live; the fs guard, shell and job policy all pick it up on their next call.

Implementation

void updateSpec(CubeSpec spec) {
  _shellSpec = spec;
  _guard = CubeFsGuard(
    _delegate,
    spec,
    homeDir: _homeDir,
    workspaceRoot: _workspaceRoot,
    pathProbe: _pathProbe,
  );
  _shell = SandboxedShell(
    _delegate,
    spec,
    fs: _delegate,
    os: _os,
    homeDir: _homeDir,
    onDegrade: _onWarning,
    pathProbe: _pathProbe,
  );
  _engine = CubePolicyEngine(
    spec,
    homeDir: _homeDir,
    workspaceRoot: _delegate.cwd,
    pathProbe: _pathProbe,
  );
}