File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ func run(cmd *cobra.Command, args []string) {
178
178
sylog .Fatalf ("While performing build: %v" , err )
179
179
}
180
180
} else {
181
- if syscall .Getuid () != 0 && ! fakeroot && fs .IsFile (spec ) {
181
+ if syscall .Getuid () != 0 && ! fakeroot && fs .IsFile (spec ) && ! isImage ( spec ) {
182
182
sylog .Fatalf ("You must be the root user, however you can use --remote or --fakeroot to build from a Singularity recipe file" )
183
183
}
184
184
@@ -187,10 +187,6 @@ func run(cmd *cobra.Command, args []string) {
187
187
sylog .Fatalf ("failed to create an image cache handle" )
188
188
}
189
189
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
-
194
190
err := checkSections ()
195
191
if err != nil {
196
192
sylog .Fatalf (err .Error ())
You can’t perform that action at this time.
0 commit comments