File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default async(options: OutdatedOptions = {}) => {
1414 const project = await Project . load ( cwd )
1515 const repo = await project . getTemplateRepo ( )
1616
17- if ( await repo . isVerioning ( ) ) {
17+ if ( ! await repo . isVerioning ( ) ) {
1818 throw new Error ( '`mili outdated` cannot check the template without version control' )
1919 } else if ( await repo . isLatest ( ) ) {
2020 logger . info ( 'Congratulations, the current template is the latest version.' )
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ test('Integration testing', async t => {
3737
3838 await update ( { cwd } )
3939 await check ( { cwd, showDiff : true , fold : true } )
40+ } )
41+
42+ await t . throwsAsync ( async ( ) => {
43+ const cwd = join ( __dirname , '../demo' )
44+ await fs . emptyDir ( cwd )
45+ const repository = relative ( process . cwd ( ) , join ( __dirname , './test-template' ) )
46+
47+ await init ( { cwd, repository : `./${ repository } ` } )
4048 await outdated ( { cwd } )
4149 } )
4250
You can’t perform that action at this time.
0 commit comments