Skip to content

Commit

Permalink
Merge pull request #2251 from lf-lang/docker-compose-bin-dir
Browse files Browse the repository at this point in the history
Docker compose also create bin directory if not present
  • Loading branch information
lhstrh committed Apr 3, 2024
2 parents 22666f0 + 8f73296 commit 205ed22
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ public void createLauncher() {
var fileConfig = context.getFileConfig();
var packageRoot = fileConfig.srcPkgPath;
var srcGenPath = fileConfig.getSrcGenPath();
var file = fileConfig.binPath.resolve(fileConfig.name).toFile();
var binPath = fileConfig.binPath;
FileUtil.createDirectoryIfDoesNotExist(binPath.toFile());
var file = binPath.resolve(fileConfig.name).toFile();
var script =
"""
#!/bin/bash
Expand All @@ -142,7 +144,9 @@ public void createLauncher() {
writer.write(script);
writer.close();
} catch (IOException e) {
messageReporter.nowhere().warning("Unable to write launcher to: " + file.getAbsolutePath());
messageReporter
.nowhere()
.warning("Unable to write launcher to " + file.getAbsolutePath() + " with error: " + e);
}

if (!file.setExecutable(true, false)) {
Expand Down

0 comments on commit 205ed22

Please sign in to comment.