Repository navigation
自動起動の状態を設定ファイルに持つ - #51
Merged
Merged
Conversation
有効かどうかの記録は LaunchAgent の plist の有無だけだったので、plist が外から 消えると設定ごと失われていた。`config.toml` の `[startup] start_at_login` を正と し、plist をその値から導く。 起動時に設定と plist を突き合わせ、食い違えば plist を合わせる。設定に値が無い 利用者は、plist が実在するときだけ書き戻す。設定ファイルへの保存が先で、成功した ときだけ plist を操作する。 インストール済みの `.app` から起動していないときは plist を新規作成しない。開発 ビルドのパスを焼き付けると次のビルドで自動起動が止まるため。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
自動起動が有効かどうかの記録は LaunchAgent の plist の有無だけで、plist が外から消えると設定ごと失われる。何も表示されないため、次のログインで起動しないことで初めて気づく。plist は手で消した場合にも、他のツールが触った場合にも消える。
変更内容
[startup] start_at_loginを足し、そちらを正とする。plist はこの値から書き出す--config-showにstart_at_loginを出す仕様の注意点
trueを書き戻す。plist が無ければ設定ファイルを作らない.appから起動していないときは plist を新規作成せず、警告だけ出す。開発ビルドのパスを焼き付けると次のビルドで自動起動が止まるため。.appではない形で入れていて plist を消された場合は復活しない確認
cargo test(156 件)./scripts/visual_regression.sh(全ケース ok)cargo fmt --check/cargo clippy --all-targets -- -D warnings./scripts/build_app_bundle.sh関連リンク