ls command working, need to debug sort, and figure out how to prevent sorting on flag (will need further debugging probs)

This commit is contained in:
2025-12-06 07:52:29 +01:00
parent 60eb56da56
commit 8a06d7cb93
5 changed files with 24 additions and 19 deletions

View File

@@ -152,7 +152,6 @@ export class Bash {
getGroupByName(name: string): Group {
const out: Group | undefined = this._group.find((group) => group.groupname === name);
console.log(out);
if (out) return out;
else throw new Error(`Cannot find a user group named ${name}`);
@@ -160,7 +159,6 @@ export class Bash {
getUserByName(name: string): User {
const out: User | undefined = this._passwd.find((user) => user.username === name);
console.log(out);
if (out) return out;
else throw new Error(`Cannot find a user named ${name}`);
@@ -168,17 +166,15 @@ export class Bash {
getGroupByGid(gid: number): Group {
const out: Group | undefined = this._group.find((group) => group.gid === gid);
console.log(out);
if (out) return out;
else throw new Error(`Cannot find a user group named ${name}`);
else throw new Error(`Cannot find a user group with id of ${gid}`);
}
getUserByUid(uid: number): User {
const out: User | undefined = this._passwd.find((user) => user.uid === uid);
console.log(out);
if (out) return out;
else throw new Error(`Cannot find a user group named ${name}`);
else throw new Error(`Cannot find a user with id of ${uid}`);
}
}