@@ -118,8 +118,12 @@ fn processArgs(file: std.fs.File, parentAllocator: std.mem.Allocator) !void {
118
118
try mount .put ("options" , std.json.Value { .array = options });
119
119
120
120
const separator = std .mem .indexOfScalar (u8 , volume_syntax , ':' ) orelse @panic ("no volume destination specified" );
121
-
122
- try mount .put ("source" , std.json.Value { .string = volume_syntax [0.. separator ] });
121
+
122
+ if (volume_syntax [0 ] == '/' ) {
123
+ try mount .put ("source" , std.json.Value { .string = volume_syntax [0.. separator ] });
124
+ } else {
125
+ try mount .put ("source" , std.json.Value { .string = try std .fs .cwd ().realpathAlloc (allocator , volume_syntax [0.. separator ])} );
126
+ }
123
127
try mount .put ("destination" , std.json.Value { .string = volume_syntax [separator + 1.. ] });
124
128
125
129
try mounts_json .append (std.json.Value { .object = mount });
@@ -174,7 +178,7 @@ pub fn main() !void {
174
178
var mountProcess = std .ChildProcess .init (& args_buf , allocator );
175
179
_ = try mountProcess .spawnAndWait ();
176
180
177
- const overlayfs_options = try std .fmt .allocPrint (allocator , "lowerdir={s},upperdir={s}/upper,workdir={s}/upper " , .{
181
+ const overlayfs_options = try std .fmt .allocPrint (allocator , "lowerdir={s},upperdir={s}/upper,workdir={s}/work " , .{
178
182
filesystem_bundle_dir_null ,
179
183
temp_dir_path ,
180
184
temp_dir_path ,
0 commit comments