Skip to content

Commit 8ef89d7

Browse files
authored
Merge pull request #117 from jasalt/master
document setTempDir configuration option
2 parents b55c9a5 + 43f160f commit 8ef89d7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

content/documentation/configuration.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ return (new \Phel\Config\PhelConfig())
2121
->setNoCacheWhenBuilding([])
2222
->setFormatDirs(['src', 'tests'])
2323
->setKeepGeneratedTempFiles(false)
24+
->setTempDir(sys_get_temp_dir().'/phel')
2425
->setBuildConfig((new \Phel\Config\PhelBuildConfig())
2526
->setMainPhelNamespace('your-ns\index')
2627
->setMainPhpPath('out/index.php'))
@@ -133,6 +134,20 @@ return (new \Phel\Config\PhelConfig())
133134
;
134135
```
135136

137+
### TempDir
138+
139+
Allows setting a custom absolute path for temporary files.
140+
141+
```php
142+
<?php
143+
return (new \Phel\Config\PhelConfig())
144+
->setTempDir('/tmp/phel')
145+
# ...
146+
;
147+
```
148+
149+
If the path does not exist and cannot be created or written to, an exception is thrown.
150+
136151
### BuildConfig
137152

138153
The configuration when running the `phel build` command.

0 commit comments

Comments
 (0)