Skip to content

Commit 9a21dbb

Browse files
committed
fix: fixed git-lfs missing install
1 parent 947f167 commit 9a21dbb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/resources/git/lfs/git-lfs.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ResourceConfig } from 'codify-schemas';
33

44
import { codifySpawn } from '../../../utils/codify-spawn.js';
55
import Schema from './git-lfs-schema.json';
6+
import os from 'node:os';
67

78
export interface GitLfsConfig extends ResourceConfig {
89
// TODO: Add --system option for installing.
@@ -24,10 +25,9 @@ export class GitLfsResource extends Resource<GitLfsConfig> {
2425
return null;
2526
}
2627

27-
// TODO: Move this to a separate resource in the future to initialize git-lfs for a dir
28-
// if (!await this.checkIfGitLfsIsInstalled()) {
29-
// return null;
30-
// }
28+
if (!await this.checkIfGitLfsIsInstalled()) {
29+
return null;
30+
}
3131

3232
return {}
3333
}
@@ -41,13 +41,13 @@ export class GitLfsResource extends Resource<GitLfsConfig> {
4141
await codifySpawn('brew install git-lfs');
4242
}
4343

44-
// await codifySpawn('git lfs install');
44+
await codifySpawn('git lfs install', { cwd: os.homedir() });
4545
}
4646

4747
override async destroy(): Promise<void> {
4848
await this.assertBrewInstalled();
4949

50-
// await codifySpawn('git lfs uninstall');
50+
await codifySpawn('git lfs uninstall', { cwd: os.homedir() });
5151
await codifySpawn('brew uninstall git-lfs');
5252
}
5353

0 commit comments

Comments
 (0)