Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blogsyncのglobal config読み込みの非互換変更に関する相談 #20

Closed
Songmu opened this issue Oct 10, 2023 · 1 comment
Closed
Assignees

Comments

@Songmu
Copy link
Contributor

Songmu commented Oct 10, 2023

ref. x-motemen/blogsync#87

global config (~/.config/blogsync/config.yaml) のlocal_rootに相対パスが指定されていたとき、今は blogsync 実行パスからの相対位置に解決されるようになっています。この挙動はblogsyncの実行位置によってpullされてくるディレクトリが変わることもあって、気持ち悪い挙動なので、変更したいと考えています。

一般的には、相対パスが指定されていた場合、設定ファイルからの相対位置に解決されるのがよくある挙動だと考え、上記のpull requestではその方針で実装しています。

ただ、global configからの相対位置に解決されるのは、直感的な挙動とは言いづらく、既存のユーザーが相対パスに設定していた場合に意図せず、これまでと違う位置にpull されるのはあまり嬉しい挙動だとは思えません。また、global configにはそもそも相対パスが設定されること自体が望ましくないとも思います。

なので、global configには相対パスの指定を禁止し、設定されていた場合にはエラー終了とすることも考えています。

何にせよ非互換変更になるのでこちらで相談しました。このワークフローではローカル設定 (blogsync.yaml) しか見ないようになっていると思うので、特に問題ないのではないかと思っていますが、ご意見あればよろしくお願いします。

@Songmu Songmu changed the title blogsyncのglobal config読み込みの非互換変更について blogsyncのglobal config読み込みの非互換変更に関する相談 Oct 10, 2023
@halkt
Copy link
Member

halkt commented Oct 11, 2023

@Songmu

わざわざご連絡いただきありがとうございます!

上記の変更については違和感はありません. また, 本仕組みの動作にも大きな影響はなさそうでしたので変更してくださっても大丈夫かと思います.

@halkt halkt closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants