quick test

This commit is contained in:
2026-05-03 15:10:47 -04:00
parent 6dddda44f6
commit 967c9cd62b
2 changed files with 14 additions and 3 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
import { Command, program } from "commander"; import { Command } from "commander";
import { SC_CONFIG } from "./config"; import { HOST } from "./host";
export function RUN_CLI(){ export function RUN_CLI(){
const c = new Command(); const c = new Command();
@@ -10,12 +10,13 @@ export function RUN_CLI(){
c c
.command('host <action>') .command('host <action>')
.action((action, opts) => { .action(async (action, opts) => {
console.log(opts) console.log(opts)
switch(action){ switch(action){
case 'init': case 'init':
console.log('init action!') console.log('init action!')
console.log(`HOSTNAME: ${await HOST.getHostname()}`)
break; break;
default: default:
+10
View File
@@ -0,0 +1,10 @@
import { $ } from "bun";
async function getHostname(){
const result = await $`hostname`.quiet().text();
return result.trim();
}
export const HOST = {
getHostname,
}