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

Use absolute datapath instead of relative. #894

Merged
merged 8 commits into from
Feb 19, 2019
Merged

Conversation

shemnon
Copy link
Contributor

@shemnon shemnon commented Feb 19, 2019

PR description

The NPE was caused by setting data-path to an empty string (either via TOML data-path="" or CLI --data-path=. This is a relative directory with no direct parent. The empty path is also an alias for the current directory, so returning the absolute path will result in a path with a parent.

Fixed Issue(s)

fixes #854

Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

LGTM.

@shemnon shemnon merged commit 44327d7 into PegaSysEng:master Feb 19, 2019
@shemnon shemnon deleted the gh_854 branch February 19, 2019 16:27
rain-on pushed a commit to rain-on/pantheon that referenced this pull request Feb 20, 2019
When using the data-path internally use an absolute version instead of the path instead of a relative form.  

This fixes a null pointer exception when the data-path is set to an empty string (in a TOML config using `data-path=""` or CLI using `--data-path=`) and interprets that empty string to be the current working directory.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants