Skip to content

Commit a066ffc

Browse files
WestleyKmem
WestleyK
authored andcommitted
Merge bug fix for 3.3
1 parent c767dc6 commit a066ffc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cmd/internal/cli/build_linux.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func run(cmd *cobra.Command, args []string) {
178178
sylog.Fatalf("While performing build: %v", err)
179179
}
180180
} else {
181-
if syscall.Getuid() != 0 && !fakeroot && fs.IsFile(spec) {
181+
if syscall.Getuid() != 0 && !fakeroot && fs.IsFile(spec) && !isImage(spec) {
182182
sylog.Fatalf("You must be the root user, however you can use --remote or --fakeroot to build from a Singularity recipe file")
183183
}
184184

@@ -187,10 +187,6 @@ func run(cmd *cobra.Command, args []string) {
187187
sylog.Fatalf("failed to create an image cache handle")
188188
}
189189

190-
if syscall.Getuid() != 0 && !fakeroot && fs.IsFile(spec) && !isImage(spec) {
191-
sylog.Fatalf("You must be the root user, however you can use --remote or --fakeroot to build from a Singularity recipe file")
192-
}
193-
194190
err := checkSections()
195191
if err != nil {
196192
sylog.Fatalf(err.Error())

0 commit comments

Comments
 (0)