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 warning when using relative path to app.ini #10104

Merged
merged 2 commits into from
Feb 2, 2020

Conversation

guillep2k
Copy link
Member

Mitigation for #10082

$ gitea --config ./app.ini doctor
2020/02/01 18:35:38 ...s/setting/setting.go:514:SetCustomPathAndConf() [W] Using 'custom' directory as relative origin for configuration file: '/home/user/custom/app.ini'
2020/02/01 18:35:38 ...s/setting/setting.go:514:SetCustomPathAndConf() [W] Using 'custom' directory as relative origin for configuration file: '/home/user/custom/app.ini'
[ 1 ] Check paths and basic configuration
- Failed to find configuration file at '/home/user/custom/app.ini'.
- If you've never ran Gitea yet, this is normal and '/home/user/custom/app.ini' will be created for you on first run.
- Otherwise check that you are running this command from the correct path and/or provide a `--config` parameter.
Error: can't proceed without a configuration file
$

It beats me why it's showing the warning twice, but I don't think it's too important.

Notice: this warning will be showing in hooks too.

@zeripath
Copy link
Contributor

zeripath commented Feb 1, 2020

I think we should just make the breaking change to have it relative to the working directory.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 1, 2020
@guillep2k
Copy link
Member Author

I think we should just make the breaking change to have it relative to the working directory.

I'd second that. It's not that big of a deal; it should be an easy fix for any admin if the instance stops working.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 2, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 2, 2020
@lafriks lafriks added this to the 1.12.0 milestone Feb 2, 2020
@codecov-io
Copy link

Codecov Report

Merging #10104 into master will decrease coverage by <.01%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10104      +/-   ##
==========================================
- Coverage   43.49%   43.48%   -0.01%     
==========================================
  Files         567      568       +1     
  Lines       79105    79109       +4     
==========================================
- Hits        34409    34403       -6     
- Misses      40447    40459      +12     
+ Partials     4249     4247       -2
Impacted Files Coverage Δ
cmd/embedded_stub.go 0% <0%> (ø)
modules/queue/manager.go 60.51% <100%> (-1.54%) ⬇️
services/pull/temp_repo.go 31.62% <0%> (-2.57%) ⬇️
models/unit.go 37.03% <0%> (-2.47%) ⬇️
routers/repo/view.go 39.13% <0%> (-0.87%) ⬇️
models/repo.go 51.46% <0%> (+0.13%) ⬆️
services/pull/patch.go 66.66% <0%> (+0.62%) ⬆️
modules/log/file.go 77.62% <0%> (+2.09%) ⬆️

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 bbf492f...e536aae. Read the comment docs.

@lafriks lafriks merged commit 70aa629 into go-gitea:master Feb 2, 2020
@guillep2k guillep2k deleted the rel-conf-warning branch February 2, 2020 23:20
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants