@@ -102,19 +102,19 @@ export class NextDeployInstance extends NextInstance {
102102 await fs . writeFile ( path . join ( this . testDir , 'netlify.toml' ) , toml )
103103 }
104104
105- // ensure netlify cli is installed
105+ // ensure netlify- cli is installed
106106 try {
107- const res = await execa ( 'netlify ' , [ '--version' ] )
107+ const res = await execa ( 'npx ' , [ 'netlify' , '--version' ] )
108108 require ( 'console' ) . log ( `Using Netlify CLI version:` , res . stdout )
109109 } catch ( _ ) {
110- require ( 'console' ) . log ( `You need to have netlify-cli installed.
110+ require ( 'console' ) . log ( `netlify-cli is not installed.
111111
112- You can do this by running: " npm install -g netlify-cli@latest" or "yarn global add netlify-cli@latest" ` )
112+ Something went wrong. Try running \` npm install\`. ` )
113113 }
114114
115115 // ensure project is linked
116116 try {
117- await execa ( 'ntl ' , [ 'status' , '--json' ] )
117+ await execa ( 'npx ' , [ 'netlify' , 'status' , '--json' ] )
118118 } catch ( err ) {
119119 if ( err . message . includes ( "You don't appear to be in a folder that is linked to a site" ) ) {
120120 throw new Error ( `Site is not linked. Please set "NETLIFY_AUTH_TOKEN" and "NETLIFY_SITE_ID"` )
@@ -132,8 +132,8 @@ export class NextDeployInstance extends NextInstance {
132132 : testName
133133
134134 const deployRes = await execa (
135- 'ntl ' ,
136- [ 'deploy' , '--build' , '--json' , '--message' , deployTitle ?? '' ] ,
135+ 'npx ' ,
136+ [ 'netlify' , ' deploy', '--build' , '--json' , '--message' , deployTitle ?? '' ] ,
137137 {
138138 cwd : this . testDir ,
139139 reject : false ,
0 commit comments