Skip to content

Commit 3842487

Browse files
authored
fix: check source update environment for intranet only (#340)
1 parent 5d7a727 commit 3842487

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/lastore-daemon/manager_update.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,14 @@ func (m *Manager) updateSource(sender dbus.Sender) (*Job, error) {
219219
m.updateSourceOnce = true
220220
m.PropsMu.Unlock()
221221
if len(m.UpgradableApps) > 0 {
222-
status, msg := m.beforeUpdateSourceEnvCheck()
223-
if m.config.IntranetUpdate && !status {
224-
job.retry = 0
225-
return &system.JobError{
226-
ErrType: system.ErrorDpkgError,
227-
ErrDetail: fmt.Sprintf("before update env check failed: %s", msg),
222+
if m.config.IntranetUpdate {
223+
status, msg := m.beforeUpdateSourceEnvCheck()
224+
if !status {
225+
job.retry = 0
226+
return &system.JobError{
227+
ErrType: system.ErrorDpkgError,
228+
ErrDetail: fmt.Sprintf("before update env check failed: %s", msg),
229+
}
228230
}
229231
}
230232

0 commit comments

Comments
 (0)