Skip to content

Failed to write cache data on lr init #3

@reynoldsme

Description

@reynoldsme

@egcli/lr/0.18.0 darwin-arm64 node-v19.0.1
node version: v19.0.1
OS: macOS 12.6.1

On a new install (linear-cli has not previously been installed or invoked), lr init emits an error message when attempting the initial write to the cache file like so:

$ lr init
You'll need to create a personal Linear api key.
You can create one here https://linear.app/joinlane/settings/api.
? Paste your Linear api key here: lin_api_***********************
? Create a label for this key (e.g. "Work") lr-cli
⠋ Getting your user info(node:81369) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
? Select your default team ******

Wrote api key and user info to /Users/$USER/.config/lr/config.json

Failed to write cache data to /Users/$USER/Library/Caches/lr/lr-cli.json

However, lr cache:refresh successfully generates a cache file which can be subsequently read with lr cache:show which leads me to believe this is not a permissions issue. Perhaps the parent directory is missing at the time of the initial attempt to write to the cache file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions