Skip to content

Add windows support to setup. Fixes #797 #798

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

Merged
merged 6 commits into from
Mar 5, 2023

Conversation

Jamie-SA
Copy link
Contributor

@Jamie-SA Jamie-SA commented Feb 25, 2023

Fixes #797
Modified the setup script so that it might work in the windows command window.
I haven't tested it yet on Windows.

If we decide to go forward with this, I will update the documentation to match the name change and additional capabilities.

Copy link
Contributor

@dylan-sa dylan-sa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the setup.cmd script in CMD and PowerShell, and it works perfectly. The unix folks won't be able to run this one, though, right? For example, I don't think I can run setup.cmd in ZSH on my Mac. Maybe we want to retain both scripts?

@Jamie-SA
Copy link
Contributor Author

Jamie-SA commented Mar 3, 2023

The unix folks won't be able to run this one, though, right? For example, I don't think I can run setup.cmd in ZSH on my Mac.

This worked on linux and I think it will work on Mac. Try to run it in ZSH: ./setup.cmd (if you are in the tools directory) or ./tools/setup.cmd (from the root of the repo).

@dylan-sa
Copy link
Contributor

dylan-sa commented Mar 3, 2023

Ah, you're absolutely right. User error on my part. 🙂

Copy link
Contributor

@dylan-sa dylan-sa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me. Tested on Windows and Mac.

@rjyounes
Copy link
Collaborator

rjyounes commented Mar 4, 2023

@Jamie-SA Does this require a change to the documentation on setting up the project? Do you need to update the release note (you can include one note for the two issues).

@Jamie-SA
Copy link
Contributor Author

Jamie-SA commented Mar 4, 2023

Documentation is now updated.

Copy link
Collaborator

@rjyounes rjyounes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jamie-SA I made a couple of tweaks to the documentation and tried to commit. I am getting the following error when the pre-commit runs:

line 32: return: can only `return' from a function or sourced script

Line 32 does indeed read "return 0"

I tried the following:

if [ ! ${rc} -eq 0 ] ; then
  return 1
else
  return 0
fi

But I get a similar error. I don't know why it accepts the "return 1" within the if statement.

I don't know if I'm doing something wrong or whether there's a problem with the pre-commit hook.

@Jamie-SA
Copy link
Contributor Author

Jamie-SA commented Mar 4, 2023

I guess some shells are more strict. I've pushed an update that will hopefully fix it.
The old version and the new version are working on my setup so I can't test it.

@rjyounes rjyounes changed the title Feature 797 add windows support to setup Add windows support to setup. Fixes #797 Mar 5, 2023
@rjyounes rjyounes merged commit 021543d into develop Mar 5, 2023
@rjyounes rjyounes deleted the feature-797-add-windows-support-to-setup branch March 5, 2023 12:33
@rjyounes
Copy link
Collaborator

rjyounes commented Mar 5, 2023

Your fix works, thanks!

@Jamie-SA Jamie-SA mentioned this pull request Apr 19, 2023
26 tasks
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.

Adapt tools/setup.sh for Windows users
3 participants