Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Bug in secman sync start Command on Windows #43

Closed
abdfnx opened this issue May 24, 2021 · 5 comments
Closed

Bug in secman sync start Command on Windows #43

abdfnx opened this issue May 24, 2021 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed invalid This doesn't seem right wontfix This will not be worked on

Comments

@abdfnx
Copy link
Contributor

abdfnx commented May 24, 2021

2021-05-24 1

secman sync start is very nice at macOS/linux

@abdfnx abdfnx added bug Something isn't working help wanted Extra attention is needed invalid This doesn't seem right wontfix This will not be worked on labels May 24, 2021
@abdfnx abdfnx self-assigned this May 24, 2021
@Timothee-Cardoso
Copy link
Member

oh no, two huge bugs 😤

@abdfnx
Copy link
Contributor Author

abdfnx commented May 24, 2021

I found the error, it's in pkg/api/sync.go

...
Run: func(cmd *cobra.Command, args []string) {
	👉 startCmd := commands.Start_ml()
	exCmd := commands.StartEX()

	shell.SHCore(startCmd, startCmd)
	shell.SHCore(exCmd, exCmd)
},

Start_ml function

func Start_ml() string {
	return `
		SM_GH_UN=$(git config user.name)
		cd $HOME/.secman
		git init

		echo "# My secman passwords - $SM_GH_UN" >> $HOME/.secman/README.md

		secman repo create .secman -d "My secman passwords - $SM_GH_UN" --private -y

		git add .
		git commit -m "new .secman repo"
		git branch -M trunk
		git remote add origin https://github.com/$SM_GH_UN/.secman
		git push -u origin trunk
	`
}

@Timothee-Cardoso
Copy link
Member

to fix it we just modify the Run function, to be like this

Run: func(cmd *cobra.Command, args []string) {
	exCmd := commands.StartEX()

	shell.SHCore(commands.Start_ml(), commands.Start_w())
	shell.SHCore(exCmd, exCmd)
},

@abdfnx
Copy link
Contributor Author

abdfnx commented May 24, 2021

👌

@abdfnx
Copy link
Contributor Author

abdfnx commented May 24, 2021

fixed

@abdfnx abdfnx closed this as completed May 24, 2021
abdfnx added a commit that referenced this issue May 24, 2021
… `git_config`

now secman can detect if the user was authenticated with secman or not

fix #42: When the user is not registered this message appears

fix #43: Bug in `secman sync start` Command on Windows

create `git_config` package at `tools`
abdfnx added a commit that referenced this issue Apr 21, 2022
#221)

Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/tidwall/gjson/releases)
- [Commits](tidwall/gjson@v1.14.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
abdfnx pushed a commit that referenced this issue May 5, 2022
Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.14.0 to 1.14.1.
- [Release notes](https://github.com/tidwall/gjson/releases)
- [Commits](tidwall/gjson@v1.14.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed invalid This doesn't seem right wontfix This will not be worked on
Projects
Status: Done 🌟
Development

No branches or pull requests

2 participants