alwaysai
Version:
The alwaysAI command-line interface (CLI)
20 lines (18 loc) • 473 B
text/typescript
import { Spinner, SshSpawner } from '../../../util';
export async function createTargetDirectoryComponent(props: {
targetHostname: string;
targetPath: string;
}) {
const spinner = Spinner('Create target directory');
try {
const spawner = SshSpawner({
targetHostname: props.targetHostname,
targetPath: props.targetPath
});
await spawner.mkdirp();
spinner.succeed();
} catch (exception) {
spinner.fail();
throw exception;
}
}