vinayaksh42 commented on issue #1406: URL: https://github.com/apache/apisix-dashboard/issues/1406#issuecomment-772616248
i have added the following code in the managerapi.go ```css cmd.PersistentFlags().StringVarP(&conf.FilePath, "filepath","c", conf.FilePath, "Config file path") ``` upon running the command ```css ./manager-api -c ./api/conf/test.yaml ``` i get the response ``` panic: couldn't open sink "/home/vinayak/github/apisix-dashboard/output/logs/error.log": open /home/vinayak/github/apisix-dashboard/output/logs/error.log: no such file or directory ``` even tho i have made a test.yaml file in the conf folder. I am not sure if i am right or not but when i run ``` ./manager-api -p ../ ``` it returns the same error as the above one ``` panic: couldn't open sink "/home/vinayak/github/apisix-dashboard/output/logs/error.log": open /home/vinayak/github/apisix-dashboard/output/logs/error.log: no such file or directory ``` but when i run ```css ./manager-api -p ../api/ ``` the manager-api starts without any issue or error ``` The manager-api is running successfully! Version : master GitHash : 6e98820 Listen : 127.0.0.1:9000 Loglevel: warn Logfile : /home/vinayak/github/apisix-dashboard/api/logs/error.log ``` I think there is some fault with the working directory command cause ultimately we have the following line of code for the config file path ```go filePath := WorkDir + "/conf/conf.json" ``` I have added a filepath variable for collecting the new filepath which will be supplied by the flag. Should i make a Work-in-progress pr for this? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
