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

fixed - not running user-aliases.cmd if aliases variable is overridde… #892

Merged
merged 1 commit into from
Mar 21, 2016

Conversation

daxgames
Copy link
Member

fixed - profile.d overridden %aliases% store not running config/user-aliases.cmd

Stanzilla added a commit that referenced this pull request Mar 21, 2016
fixed - not running user-aliases.cmd if aliases variable is overridde…
@Stanzilla Stanzilla merged commit f9d0050 into cmderdev:development Mar 21, 2016
@daxgames
Copy link
Member Author

daxgames commented May 7, 2016

Did you already have a user-aliases.cmd? or did you rename aliases manually to user-aliases.cmd?

@Stanzilla
Copy link
Member

Nope, only the old aliases file.

@daxgames
Copy link
Member Author

daxgames commented May 7, 2016

The logic for the update prior to my pull requests today is below

if not exist "%user-aliases%" (
   echo Creating intial user-aliases store in "%user-aliases%"...
   copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
)

:: Update old 'user-aliases' to new self executing 'user-aliases.cmd'
if exist "%CMDER_ROOT%\config\aliases" (
  echo Updating old "%CMDER_ROOT%\config\aliases" to new format...
  type "%CMDER_ROOT%\config\aliases" >> "%user-aliases%" && del "%CMDER_ROOT%\config\aliases"
)

So if all you had was the old aliases file and no pre-existing 'user-aliases.cmd' a new 'user-aliases.cmd' SHOULD have been created from the new 'vendor\user-aliases.cmd.example' which contains the self extracting logic. Then if the 'aliases' file exists it is appended to the new 'user-aliases.cmd' and 'aliases is deleted at that point.

I don't see a flaw unless your 'vendor\user-aliases.cmd.example' does not have the self extracting loigic and I can't explain that.

I did a pull request today that makes the process a little more robust. Please let me know if you figure out why it does not work.

@daxgames daxgames deleted the fix_aliases branch May 7, 2016 20:23
@Stanzilla
Copy link
Member

Yup figured it out, I didn't have the example file at all, my fault!

@daxgames
Copy link
Member Author

daxgames commented May 7, 2016

Cool, glad you figured it out.

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.

2 participants