Skip to content

Cache error in info & outdated #328

@duhd1993

Description

@duhd1993

Your Environment

  • mas version:1.8.1
  • macOS version (system_profiler SPSoftwareDataType -detailLevel mini): 11.2.3

mas Install Method

brew install mas (homebrew-core)

Describe the Bug

Running mas info xx or mas outdated sometimes incur errors like this

2021-03-16 21:23:54.978 mas[19064:1993163] INFO: fetch-response is unable to open the file /Users/username/Library/Caches/com.mphys.mas-cli/fsCachedData/9C5B8520-0F28-4B6D-BCC4-B2F851254EED. Errno: 2

This file exists, but it has an extra .tmp extension. It seems to be related to

session.loadData(from: url) { (data: Data?, error: Error?) in

In my case, the error happens every other run. Run 1, no error, and creates the file with .tmp extension. Run 2, shows error, and create the file with no extension, which is correct. Run 3, no error, and creates the file with .tmp extension...

To Reproduce

  1. mas info 1333542190 Run twice

Expected Behavior

No error.

Actual Behavior

Shows error.

Screenshots, Terminal Output

$ mas command
...

Additional Context

There are some discussions on this in #306

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions