8000 Make generated files executable when they have shebang by kmyk · Pull Request #138 · kyuridenamida/atcoder-tools · GitHub
[go: up one dir, main page]

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

Make generated files executable when they have shebang #138

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

kmyk
Copy link
Contributor
@kmyk kmyk commented Apr 9, 2019

close #137

  • 「Python かどうか」ではなく「shebang があるかどうか」で判断をしました
  • Windows の上でどう動作するかは不明ですが、ドキュメントを見る限りは最悪でも単に無視されるだけのはずです: https://docs.python.org/ja/3/library/os.html#os.chmod
  • テストも書くべきですが、入り組んでいて追加がしんどいのでとりあえずはなしにしました

@codecov-io
Copy link
codecov-io commented Apr 9, 2019

Codecov Report

Merging #138 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
+ Coverage    88.9%   88.92%   +0.01%     
==========================================
  Files          49       49              
  Lines        2227     2231       +4     
==========================================
+ Hits         1980     1984       +4     
  Misses        247      247
Impacted Files Coverage Δ
atcodertools/fileutils/create_contest_file.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48880c9...833c442. Read the comment docs.

@kyuridenamida
Copy link
Owner
kyuridenamida commented Apr 10, 2019

ありがとうございます。

「Python かどうか」ではなく「shebang があるかどうか」で判断をしました

よさそうなheuristicsだと思います :ten: :sai:

Windowsのパーミッションは手元に手軽に動かせる実行環境がなくて実際どういう挙動になるか僕もよく分からないですよね。とりあえずMacとLinuxで動くことを第一目標とします。本当は競プロはWindowsユーザーがマジョリティであることを知ったので無視しちゃだめなんですが。

@kyuridenamida kyuridenamida merged commit a574ed3 into kyuridenamida:master Apr 10, 2019
@kyuridenamida kyuridenamida modified the milestones: 11., 1.1.4 Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

main.pyに実行権限がついておらず、testに失敗する
3 participants
0