File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1111 },
1212 "scripts" : {
1313 "build" : " tsc" ,
14- "test " : " tsc && jest " ,
14+ "now-postinstall " : " node dist/install-rust.js " ,
1515 "prepublishOnly" : " tsc" ,
16+ "test" : " tsc && jest" ,
1617 "typecheck" : " tsc --noEmit"
1718 },
1819 "files" : [
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {
1414 DownloadedFiles ,
1515 Lambda
1616} from "@now/build-utils" ; // eslint-disable-line import/no-extraneous-dependencies
17- import installRust from "./install-rust" ;
1817
1918interface PackageManifest {
2019 targets : { kind : string ; name : string } [ ] ;
@@ -275,10 +274,6 @@ export async function build(opts: BuildOptions) {
275274 const downloadedFiles = await download ( files , workPath , meta ) ;
276275 const entryPath = downloadedFiles [ entrypoint ] . fsPath ;
277276
278- if ( ! meta . isDev ) {
279- await installRust ( config . rust ) ;
280- }
281-
282277 const { PATH , HOME } = process . env ;
283278 const rustEnv : Record < string , string > = {
284279 ...process . env ,
Original file line number Diff line number Diff line change @@ -34,7 +34,12 @@ async function installOpenSSL() {
3434 }
3535}
3636
37- export default async ( version ?: string ) => {
37+ export const installRustAndFriends = async ( version ?: string ) => {
3838 await downloadRustToolchain ( version ) ;
3939 await installOpenSSL ( ) ;
4040} ;
41+
42+ installRustAndFriends ( ) . catch ( err => {
43+ console . error ( err ) ;
44+ process . exit ( 1 ) ;
45+ } ) ;
You can’t perform that action at this time.
0 commit comments