Support des modules a tester
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
const { lsmod } = require('/chibrax/kernel.js')
|
||||
|
||||
console.log(lsmod())
|
||||
@@ -0,0 +1,3 @@
|
||||
const { modprobe } = require('/chibrax/kernel.js')
|
||||
if(process.argv[3])modprobe(process.argv[3])
|
||||
else console.log("missing argument")
|
||||
@@ -64,10 +64,14 @@ function evaluateProgram(args){
|
||||
const files = fs.readdirSync(path);
|
||||
if(files.includes(`${args[0]}.js`)){
|
||||
found = true;
|
||||
//@ts-expect-error
|
||||
const script = execSync(`${environment.node} ${path + '/' + args[0]}.js ${args.map(arg => {return arg.includes(' ') ? `"${arg}"` : arg}).join(' ')}`, {cwd: current_dir, env: environment, shell: true});
|
||||
process.stdout.write(script)
|
||||
tobreak = true;
|
||||
try {
|
||||
//@ts-expect-error
|
||||
const script = execSync(`${environment.node} ${path + '/' + args[0]}.js ${args.map(arg => {return arg.includes(' ') ? `"${arg}"` : arg}).join(' ')}`, {cwd: current_dir, env: environment, shell: true});
|
||||
process.stdout.write(script)
|
||||
tobreak = true;
|
||||
} catch(e) {
|
||||
console.log("Program crashed")
|
||||
}
|
||||
}
|
||||
|
||||
if(tobreak) break;
|
||||
|
||||
Reference in New Issue
Block a user