Skip to content

Commit

Permalink
fix: allow use of relative paths for interactive mode
Browse files Browse the repository at this point in the history
So `bsm ~ -i` works now
  • Loading branch information
UnderKoen committed Apr 16, 2024
1 parent 9e26eae commit 36968d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Interactive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export class Interactive {
config: TConfig,
argv: minimist.ParsedArgs,
): Promise<string[]> {
const args = argv._[0]?.split(".") ?? [];
const arg = argv._[0]?.replace(/^~/, process.env.BSM_PATH ?? "~");

const args = arg?.split(".") ?? [];

const initial: [string, TScript][] = [];
let par: TScript[] | TScripts = config.scripts;
Expand Down

0 comments on commit 36968d8

Please sign in to comment.