-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
表題の通り、 2.4.0 以降のバージョンで test や submit の --dir に相対パスを指定すると FileNotFoundError になります。
https://github.com/kyuridenamida/atcoder-tools/blob/stable/atcodertools/executils/run_program.py#L38
の run_program に相対パスが渡ってきている かつ、 subprocess.run の引数 cwd が指定されているため、実行ファイルを cwd からの相対パスで探そうとしてそのパスに実行ファイルがないため失敗している様子です。
Python のドキュメント によると、
If cwd is not None, the function changes the working directory to cwd before executing the child. cwd can be a string, bytes or path-like object. In particular, the function looks for executable (or for the first item in args) relative to cwd if the executable path is a relative path.
とのことです。
実行ファイルのパスを cwd からの相対パスにしたいことはあまりない気がしますので、 run_program に渡る前に相対パスを解決する層を追加するのが良さそうでしょうか……(あまり全体を追えてないですが)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels