Skip to content

atcoder_config の upload_script を相対パスで指定できない #94

@sotanishy

Description

@sotanishy

現状, upload_script を絶対パスで指定しないと動きませんが, base_dir からの相対パスで指定できると嬉しいです.

相対パスを指定して rime upload を dry-run すると,以下のコードの 216 行目で AttributeError: 'NoneType' object has no attribute 'startswith' が生じます.

script = os.path.join(problem.project.atcoder_upload_script)
if not os.path.exists(os.path.join(problem.project.base_dir, script)):
ui.errors.Error(problem, script + ' is not found.')
yield False
stmp = files.ReadFile(script)
if not stmp.startswith('#!/usr/bin/php'):
ui.errors.Error(problem, script + ' is not an upload script.')
yield False

211 行目の if 文はスクリプトのパスが base_dir と join されるので通りますが,次の 215 行目では join されていないので,スクリプトが読み込めていないのだと考えます.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions