File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { ResourceConfig } from 'codify-schemas';
33
44import { codifySpawn } from '../../../utils/codify-spawn.js' ;
55import Schema from './git-lfs-schema.json' ;
6+ import os from 'node:os' ;
67
78export 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
You can’t perform that action at this time.
0 commit comments