diff options
Diffstat (limited to 'build/macros.go')
-rw-r--r-- | build/macros.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build/macros.go b/build/macros.go index 5d3422e..08556d1 100644 --- a/build/macros.go +++ b/build/macros.go @@ -11,9 +11,10 @@ func ApplyUser(uid uint, gid uint, instructions []Instruction) []Instruction { applied := make([]Instruction, len(instructions)) for i, instruction := range instructions { - if copy, iscopy := instruction.(Copy); iscopy { - applied[i] = CopyAs{uid, gid, copy} - } else { + switch instruction.(type) { + case Copy, CopyFrom: + applied[i] = CopyAs{uid, gid, instruction} + default: applied[i] = instruction } } |