Skip to content

Commit

Permalink
Only set tmp dir for Lambda in normal mode
Browse files Browse the repository at this point in the history
Fixes: #41124
  • Loading branch information
geoand committed Jun 12, 2024
1 parent 3ab88f5 commit 016940c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.quarkus.amazon.lambda.http.model.MultiValuedTreeMap;
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.arc.deployment.UnremovableBeanBuildItem;
import io.quarkus.deployment.IsNormal;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
Expand Down Expand Up @@ -92,7 +93,7 @@ public void registerReflectionClasses(BuildProducer<ReflectiveClassBuildItem> re
/**
* Lambda provides /tmp for temporary files. Set vertx cache dir
*/
@BuildStep
@BuildStep(onlyIf = IsNormal.class)
void setTempDir(BuildProducer<SystemPropertyBuildItem> systemProperty) {
systemProperty.produce(new SystemPropertyBuildItem(CACHE_DIR_BASE_PROP_NAME, "/tmp/quarkus"));
}
Expand Down

0 comments on commit 016940c

Please sign in to comment.