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

Find relative commands from the current Aruba directory #702

Merged
merged 4 commits into from
Jan 27, 2020

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Jan 25, 2020

Summary

Find relative commands from the current Aruba directory

Details

In an Arabu spec or scenario, files are created relative to the current Aruba directory. When creating an executable in that way, it should be possible to run that executable using the same relative path.

This change means that executables in the project under test can no longer be find using the relative path from the project directory. They should be added to the path. This is done automatically by Bundler.

Technically this is accomplished by doing the command lookup inside an in_current_directory block.

Motivation and Context

Fixes #552.

How Has This Been Tested?

Specs and cukes were added.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (cleanup of codebase without changing any existing functionality)
  • Update documentation

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

In an Arabu spec or scenario, files are created relative to the current
Aruba directory. When creating an executable in that way, it should be
possible to run that executable using the same relative path.

This change means that executables in the project under test can no
longer be find using the relative path from the project directory. They
should be added to the path. This is done automatically by Bundler.
@mvz mvz requested a review from olleolleolle January 25, 2020 17:51
Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

This looks good and I had one question.

#!/bin/bash
exit 0
BASH
chmod 0x755, 'bin/aruba-test-cli'
Copy link
Contributor

Choose a reason for hiding this comment

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

This says 0x755 where the other one says 0o755, is there a difference by choice? Or by accident?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems to be a RuboCop correction. I'll equalize these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, it was just wrong 🙂. It should be 0o755 or 0755.

@mvz mvz merged commit e15f894 into master Jan 27, 2020
@olleolleolle
Copy link
Contributor

Yay hooray!

@mvz mvz deleted the issue-552-fix-relative-which branch January 27, 2020 07:36
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.

Executing relative paths, oh my!
2 participants