File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,15 @@ public function registerInternalStorage(): self
168168 $ path = $ this ->root . '/.tempest ' ;
169169
170170 if (! is_dir ($ path )) {
171- mkdir ($ path , recursive: true );
171+ if (file_exists ($ path )) {
172+ throw new \RuntimeException ('Unable to create internal storage directory, as a file with the same name (.tempest) already exists. ' );
173+ }
174+
175+ if (! mkdir ($ path , recursive: true )) {
176+ throw new \RuntimeException ('Unable to create internal storage directory because of insufficient user permission on the root directory. ' );
177+ }
178+ } elseif (! is_writable ($ path )) {
179+ throw new \RuntimeException ('Insufficient user permission to write to internal storage directory. ' );
172180 }
173181
174182 $ this ->internalStorage = realpath ($ path );
You can’t perform that action at this time.
0 commit comments