1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -674,22 +674,20 @@ def puppeteer_test(
674
674
def install_puppeteer (command_context , product , ci ):
675
675
setup ()
676
676
env = {"HUSKY" : "0" }
677
- from mozversioncontrol import get_repository_object
678
677
679
- repo = get_repository_object (command_context .topsrcdir )
680
678
puppeteer_dir = os .path .join ("remote" , "test" , "puppeteer" )
681
- changed_files = False
682
- for f in repo .get_changed_files ():
683
- if f .startswith (puppeteer_dir ) and f .endswith (".ts" ):
684
- changed_files = True
685
- break
686
679
687
680
if product != "chrome" :
688
681
env ["PUPPETEER_SKIP_DOWNLOAD" ] = "1"
689
- lib_dir = os .path .join (command_context .topsrcdir , puppeteer_dir , "lib" )
690
- if changed_files and os .path .isdir (lib_dir ):
691
- # clobber lib to force `tsc compile` step
692
- shutil .rmtree (lib_dir )
682
+
683
+ if not ci :
684
+ npm (
685
+ "run" ,
686
+ "clean" ,
687
+ cwd = os .path .join (command_context .topsrcdir , puppeteer_dir ),
688
+ env = env ,
689
+ exit_on_fail = False ,
690
+ )
693
691
694
692
command = "ci" if ci else "install"
695
693
npm (command , cwd = os .path .join (command_context .topsrcdir , puppeteer_dir ), env = env )
0 commit comments