@@ -102,19 +102,19 @@ export class NextDeployInstance extends NextInstance {
102
102
await fs . writeFile ( path . join ( this . testDir , 'netlify.toml' ) , toml )
103
103
}
104
104
105
- // ensure netlify cli is installed
105
+ // ensure netlify- cli is installed
106
106
try {
107
- const res = await execa ( 'netlify ' , [ '--version' ] )
107
+ const res = await execa ( 'npx ' , [ 'netlify' , '--version' ] )
108
108
require ( 'console' ) . log ( `Using Netlify CLI version:` , res . stdout )
109
109
} catch ( _ ) {
110
- require ( 'console' ) . log ( `You need to have netlify-cli installed.
110
+ require ( 'console' ) . log ( `netlify-cli is not installed.
111
111
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\`. ` )
113
113
}
114
114
115
115
// ensure project is linked
116
116
try {
117
- await execa ( 'ntl ' , [ 'status' , '--json' ] )
117
+ await execa ( 'npx ' , [ 'netlify' , 'status' , '--json' ] )
118
118
} catch ( err ) {
119
119
if ( err . message . includes ( "You don't appear to be in a folder that is linked to a site" ) ) {
120
120
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 {
132
132
: testName
133
133
134
134
const deployRes = await execa (
135
- 'ntl ' ,
136
- [ 'deploy' , '--build' , '--json' , '--message' , deployTitle ?? '' ] ,
135
+ 'npx ' ,
136
+ [ 'netlify' , ' deploy', '--build' , '--json' , '--message' , deployTitle ?? '' ] ,
137
137
{
138
138
cwd : this . testDir ,
139
139
reject : false ,
0 commit comments