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

Add text with shebang to support execute script directly #4

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

iysheng
Copy link
Contributor

@iysheng iysheng commented Sep 20, 2021

添加文件头以支持直接在命令行,执行该脚本.

./formatting

@mysterywolf mysterywolf merged commit 2619e43 into mysterywolf:master Sep 20, 2021
@mysterywolf
Copy link
Owner

你好 这个可以更新一下readme吗 怎么操作?

@iysheng iysheng mentioned this pull request Sep 25, 2021
@iysheng
Copy link
Contributor Author

iysheng commented Sep 25, 2021

你好 这个可以更新一下readme吗 怎么操作?
可以啊. #5

@mysterywolf
Copy link
Owner

这个shebang我改成了#!/usr/bin/env python 你看看在linux下可不可以用

@mysterywolf
Copy link
Owner

mysterywolf commented Sep 26, 2021

不过加了这个东西之后,在windows环境下直接通过python.exe去执行就执行不了了

@mysterywolf
Copy link
Owner

除此之外 到底是#!/usr/bin/env python3 还是 #!/usr/bin/env python 这个在不同的电脑上也不太一样

@mysterywolf
Copy link
Owner

我把这个revert回去了 老老实实用python或python3 formatting.py吧😂 除非也把windows也测试可以了。

@iysheng
Copy link
Contributor Author

iysheng commented Sep 27, 2021

@mysterywolf 在 windows 上测试直接通过 ./formatting.py 确实是执行不了的,这个 pr 是针对 linux 的,因为习惯了在 linux 上 ./command 的方式执行,不同操作系统的 shebang 一般都是不一样的,这次我考虑有点少了,☺️

@mysterywolf
Copy link
Owner

没事没事 pr又不是一锤子买卖,可以修修补补。不用太多顾虑,看见那里不爽可以继续发pr。欢迎欢迎。😁

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

Successfully merging this pull request may close these issues.

2 participants