File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ public function __invoke()
30
30
$ this ->files ->copy ($ stubPath .'/runtime.php ' , $ this ->appPath .'/runtime.php ' );
31
31
}
32
32
33
- $ this ->files -> copy ($ stubPath .'/cliRuntime.php ' , $ this ->appPath .'/cliRuntime.php ' );
34
- $ this ->files -> copy ($ stubPath .'/fpmRuntime.php ' , $ this ->appPath .'/fpmRuntime.php ' );
35
- $ this ->files -> copy ($ stubPath .'/httpRuntime.php ' , $ this ->appPath .'/httpRuntime.php ' );
36
- $ this ->files -> copy ($ stubPath .'/httpHandler.php ' , $ this ->appPath .'/httpHandler.php ' );
33
+ $ this ->copyMissing ($ stubPath .'/cliRuntime.php ' , $ this ->appPath .'/cliRuntime.php ' );
34
+ $ this ->copyMissing ($ stubPath .'/fpmRuntime.php ' , $ this ->appPath .'/fpmRuntime.php ' );
35
+ $ this ->copyMissing ($ stubPath .'/httpRuntime.php ' , $ this ->appPath .'/httpRuntime.php ' );
36
+ $ this ->copyMissing ($ stubPath .'/httpHandler.php ' , $ this ->appPath .'/httpHandler.php ' );
37
37
38
38
if (Manifest::shouldSeparateVendor ($ this ->environment )) {
39
39
file_put_contents (
@@ -61,4 +61,18 @@ protected function configureHttpHandler($file)
61
61
file_get_contents ($ file )
62
62
);
63
63
}
64
+
65
+ /**
66
+ * Copy a file to a new location if that file does not exist.
67
+ *
68
+ * @param string $from
69
+ * @param string $to
70
+ * @return void
71
+ */
72
+ protected function copyMissing ($ from , $ to )
73
+ {
74
+ if (! $ this ->files ->exists ($ to )) {
75
+ $ this ->files ->copy ($ from , $ to );
76
+ }
77
+ }
64
78
}
You can’t perform that action at this time.
0 commit comments