Skip to content

Commit

Permalink
Merge pull request #149 from kit494way/fix-scan-debian
Browse files Browse the repository at this point in the history
Fix apt command to scan correctly when system locale is not english
  • Loading branch information
kotakanbe authored Aug 15, 2016
2 parents d6f1286 + b9404d0 commit e5b1a0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scan/debian.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (o *debian) fillCandidateVersion(packs []models.PackageInfo) ([]models.Pack
select {
case pack := <-reqChan:
func(p models.PackageInfo) {
cmd := fmt.Sprintf("apt-cache policy %s", p.Name)
cmd := fmt.Sprintf("LANG=en_US.UTF-8 apt-cache policy %s", p.Name)
r := o.ssh(cmd, sudo)
if !r.isSuccess() {
errChan <- fmt.Errorf("Failed to SSH: %s.", r)
Expand Down Expand Up @@ -387,7 +387,7 @@ func (o *debian) GetUnsecurePackNamesUsingUnattendedUpgrades() (packNames []stri
}

func (o *debian) GetUpgradablePackNames() (packNames []string, err error) {
cmd := util.PrependProxyEnv("apt-get upgrade --dry-run")
cmd := util.PrependProxyEnv("LANG=en_US.UTF-8 apt-get upgrade --dry-run")
r := o.ssh(cmd, sudo)
if r.isSuccess(0, 1) {
return o.parseAptGetUpgrade(r.Stdout)
Expand Down

0 comments on commit e5b1a0b

Please sign in to comment.