Skip to content

Commit d9a325a

Browse files
committed
Error handling
1 parent b6b95dc commit d9a325a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/fpm/manifest/package.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ subroutine new_package(self, table, root, error)
165165
version_file = join_path(root, version)
166166
if (exists(version_file)) then
167167
deallocate(error)
168-
open(file=version_file, unit=io, iostat=stat)
168+
open(file=version_file, newunit=io, iostat=stat)
169169
if (stat == 0) then
170170
call getline(io, version, iostat=stat)
171171
end if
@@ -180,6 +180,7 @@ subroutine new_package(self, table, root, error)
180180
end if
181181
end if
182182
end if
183+
if (allocated(error)) return
183184

184185
call get_value(table, "dependencies", child, requested=.false.)
185186
if (associated(child)) then

0 commit comments

Comments
 (0)