Skip to content

Commit

Permalink
Clone git repo to home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUltDev committed Jun 9, 2023
1 parent 5cada7e commit 677971d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hooks/useShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export function useShell(): ShellInstance {
// Auto clone repo if in url
if (location.pathname.startsWith('/~/')) {
const repo = location.pathname.replace('/~/', 'https://');
const folder = location.pathname.match(/\/([^/]+)\.git/)?.[1];
await input.write(`git clone ${repo} && cd ${folder} && ni\n`);
await input.write(`git clone ${repo} './' && ni\n`);
}
// Clear terminal and display
terminal.clear();
Expand Down

0 comments on commit 677971d

Please sign in to comment.