@@ -242,6 +242,7 @@ fn css_modules_stdout() -> Result<(), Box<dyn std::error::Error>> {
242242 let infile = assert_fs:: NamedTempFile :: new ( "test.css" ) ?;
243243 infile. write_str ( & input) ?;
244244 let mut cmd = Command :: cargo_bin ( "parcel_css" ) ?;
245+ cmd. current_dir ( infile. path ( ) . parent ( ) . unwrap ( ) ) ;
245246 cmd. arg ( infile. path ( ) ) ;
246247 cmd. arg ( "--css-modules" ) ;
247248 cmd. assert ( ) . success ( ) . stdout ( predicate:: str:: contains ( output) ) ;
@@ -263,6 +264,7 @@ fn css_modules_infer_output_file() -> Result<(), Box<dyn std::error::Error>> {
263264 let outfile = assert_fs:: NamedTempFile :: new ( "out.css" ) ?;
264265 infile. write_str ( & input) ?;
265266 let mut cmd = Command :: cargo_bin ( "parcel_css" ) ?;
267+ cmd. current_dir ( infile. path ( ) . parent ( ) . unwrap ( ) ) ;
266268 cmd. arg ( infile. path ( ) ) ;
267269 cmd. arg ( "--css-modules" ) ;
268270 cmd. arg ( "-o" ) . arg ( outfile. path ( ) ) ;
@@ -284,6 +286,7 @@ fn css_modules_output_target_option() -> Result<(), Box<dyn std::error::Error>>
284286 let modules_file = assert_fs:: NamedTempFile :: new ( "module.json" ) ?;
285287 infile. write_str ( & input) ?;
286288 let mut cmd = Command :: cargo_bin ( "parcel_css" ) ?;
289+ cmd. current_dir ( infile. path ( ) . parent ( ) . unwrap ( ) ) ;
287290 cmd. arg ( infile. path ( ) ) ;
288291 cmd. arg ( "-o" ) . arg ( outfile. path ( ) ) ;
289292 cmd. arg ( "--css-modules" ) ;
@@ -305,6 +308,7 @@ fn sourcemap() -> Result<(), Box<dyn std::error::Error>> {
305308 let outfile = outdir. child ( "out.css" ) ;
306309 infile. write_str ( & input) ?;
307310 let mut cmd = Command :: cargo_bin ( "parcel_css" ) ?;
311+ cmd. current_dir ( infile. path ( ) . parent ( ) . unwrap ( ) ) ;
308312 cmd. arg ( infile. path ( ) ) ;
309313 cmd. arg ( "-o" ) . arg ( outfile. path ( ) ) ;
310314 cmd. arg ( "--sourcemap" ) ;
0 commit comments