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

Using cf-app sets target as modified #21

Open
deinman opened this issue Dec 11, 2019 · 1 comment
Open

Using cf-app sets target as modified #21

deinman opened this issue Dec 11, 2019 · 1 comment

Comments

@deinman
Copy link

deinman commented Dec 11, 2019

Using cf-targets version 1.2.0 and cf CLI version 6.48.0 I'm suddenly seeing errors trying to switch targets without the -f flag claiming that I've modified the current target, but no modifications were made to the target.

Steps to reproduce:

  1. login to a cf api
  2. save target
  3. run cf app {app}

If you then run 'cf targets` the target shows as modified.

Not certain if other commands trigger the same issue, I use the cf app command constantly in my workflow so it's the one that's caused me to add the -f to most of my scripts to work around this.

@sahil-bawa
Copy link

@deinman true. certain commands, and other cf plugins fiddle with the cf_home but not necessarily the login details. Since, in the code, I can see @guidowb is using a byte comparison between the two homes, I guess that tight comparison causes the issue. Maybe if we just check certain properties in home and not the entire file, things will be different. I will experiment with this if I find time.

Reference: https://github.com/guidowb/cf-targets-plugin/blob/master/cf_targets.go#L294

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

No branches or pull requests

2 participants